kotlin
private fun XPayClient.toResponseMap(): Map<String, String> {
val result = HashMap<String, String>()
log.info("====== [DEBUG] : ResponseNameCount: ${this.ResponseNameCount()}")
log.info("====== [DEBUG] : ResponseCount: ${this.ResponseCount()}")
for (i in 0 until this.ResponseNameCount()) {
log.info("===== [DEBUG] this.Responsename(i) = ${this.ResponseName(i)} ===== ")
log.info("===== [DEBUG] this.ResponseCount() - 1 = ${this.ResponseCount() - 1} =====")
result[this.ResponseName(i)] = this.Response(this.ResponseName(i), this.ResponseCount() - 1)
log.info("===== [DEBUG] $i 번까지 수행 완료")
}
return result
} kotlin
private fun XPayClient.toResponseMap(): Map<String, String> {
val result = HashMap<String, String>()
log.info("====== [DEBUG] : ResponseNameCount: ${this.ResponseNameCount()}")
log.info("====== [DEBUG] : ResponseCount: ${this.ResponseCount()}")
for (i in 0 until this.ResponseNameCount()) {
log.info("===== [DEBUG] this.Responsename(i) = ${this.ResponseName(i)} ===== ")
log.info("===== [DEBUG] this.ResponseCount() - 1 = ${this.ResponseCount() - 1} =====")
result[this.ResponseName(i)] = this.Response(this.ResponseName(i), this.ResponseCount() - 1)
log.info("===== [DEBUG] $i 번까지 수행 완료")
}
return result
}20:47:14.136 [NioDispatcher-2 @coroutine#1] INFO c.n.p.g.t.TossPaymentsClient - ===== [DEBUG] 38 번까지 수행 완료
20:47:14.136 [NioDispatcher-2 @coroutine#1] INFO c.n.p.g.t.TossPaymentsClient - ===== [DEBUG] this.Responsename(i) = LGD_BUYERID =====
20:47:14.136 [NioDispatcher-2 @coroutine#1] INFO c.n.p.g.t.TossPaymentsClient - ===== [DEBUG] this.ResponseCount() - 1 = 0 =====
20:47:14.136 [NioDispatcher-2 @coroutine#1] INFO c.n.p.g.t.TossPaymentsClient - ===== [DEBUG] 39 번까지 수행 완료
20:47:14.136 [NioDispatcher-2 @coroutine#1] INFO c.n.p.g.t.TossPaymentsClient - ===== [DEBUG] this.Responsename(i) = LGD_ORDERS_METADATA =====
20:47:14.136 [NioDispatcher-2 @coroutine#1] INFO c.n.p.g.t.TossPaymentsClient - ===== [DEBUG] this.ResponseCount() - 1 = 0 =====
20:47:14.186 [NioDispatcher-2 @coroutine#1] ERROR c.n.p.c.GlobalErrorWebExceptionHandler - Internal Error
java.lang.NullPointerException: this.Response(this.Respo…this.ResponseCount() - 1) must not be null20:47:14.136 [NioDispatcher-2 @coroutine#1] INFO c.n.p.g.t.TossPaymentsClient - ===== [DEBUG] 38 번까지 수행 완료
20:47:14.136 [NioDispatcher-2 @coroutine#1] INFO c.n.p.g.t.TossPaymentsClient - ===== [DEBUG] this.Responsename(i) = LGD_BUYERID =====
20:47:14.136 [NioDispatcher-2 @coroutine#1] INFO c.n.p.g.t.TossPaymentsClient - ===== [DEBUG] this.ResponseCount() - 1 = 0 =====
20:47:14.136 [NioDispatcher-2 @coroutine#1] INFO c.n.p.g.t.TossPaymentsClient - ===== [DEBUG] 39 번까지 수행 완료
20:47:14.136 [NioDispatcher-2 @coroutine#1] INFO c.n.p.g.t.TossPaymentsClient - ===== [DEBUG] this.Responsename(i) = LGD_ORDERS_METADATA =====
20:47:14.136 [NioDispatcher-2 @coroutine#1] INFO c.n.p.g.t.TossPaymentsClient - ===== [DEBUG] this.ResponseCount() - 1 = 0 =====
20:47:14.186 [NioDispatcher-2 @coroutine#1] ERROR c.n.p.c.GlobalErrorWebExceptionHandler - Internal Error
java.lang.NullPointerException: this.Response(this.Respo…this.ResponseCount() - 1) must not be nullLGD_ORDERS_METADATALGD_ORDERS_METADATA 이 ResponseName의 값이 없는것 같은데, 이유가 궁금합니다.