From 63265f0511b1fdd8376be4c98d1e50129e84e52c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=98=84=EC=A4=80?= <4whomtbts@gmail.com> Date: Sun, 13 Aug 2023 05:17:48 +0900 Subject: [PATCH] =?UTF-8?q?hotfix:=20=EB=8C=93=EA=B8=80=EB=AA=A9=EB=A1=9D?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=EC=8B=9C=20AttributeConverter=20=EC=98=88?= =?UTF-8?q?=EC=99=B8=20=EB=B0=9C=EC=83=9D=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/draw/common/converter/GenericJsonConverter.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/draw/common/converter/GenericJsonConverter.kt b/src/main/kotlin/com/draw/common/converter/GenericJsonConverter.kt index a47895b..a24b4f0 100644 --- a/src/main/kotlin/com/draw/common/converter/GenericJsonConverter.kt +++ b/src/main/kotlin/com/draw/common/converter/GenericJsonConverter.kt @@ -21,8 +21,14 @@ open class GenericJsonConverter(private val typeReference: TypeReference) } } - override fun convertToEntityAttribute(jsonStr: String): T { + override fun convertToEntityAttribute(jsonStr: String?): T? { // Json 문자열 -> Object + + // TODO (larry.x) writerInfo 가 null 인 경우에 jsonStr not-nullable 이어서 + // 실패하는 문제가 있어서 임시로 처리해두었음 + if (jsonStr == null) { + return null + } return try { objectMapper.readValue(jsonStr, typeReference) } catch (e: IOException) {