viktorsomogyi commented on a change in pull request #4090: URL: https://github.com/apache/kafka/pull/4090#discussion_r492727120
########## File path: core/src/main/scala/kafka/utils/Json.scala ########## @@ -69,8 +70,11 @@ object Json { * @return An `Either` which in case of `Left` means an exception and `Right` is the actual return value. */ def tryParseFull(input: String): Either[JsonProcessingException, JsonValue] = - try Right(mapper.readTree(input)).map(JsonValue(_)) - catch { case e: JsonProcessingException => Left(e) } + if (input != null && input.isEmpty) Review comment: Wasn't sure what to do here but `null` is checked in `readTree` and an IllegalArgumentException is thrown so I decided to go skip here and leave the original behavior. ########## File path: core/src/main/scala/kafka/utils/Json.scala ########## @@ -69,8 +70,11 @@ object Json { * @return An `Either` which in case of `Left` means an exception and `Right` is the actual return value. */ def tryParseFull(input: String): Either[JsonProcessingException, JsonValue] = - try Right(mapper.readTree(input)).map(JsonValue(_)) - catch { case e: JsonProcessingException => Left(e) } + if (input != null && input.isEmpty) Review comment: Wasn't sure what to do here but `null` is checked in `readTree` and an IllegalArgumentException is thrown so I decided to skip here and leave the original behavior. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org