chia7712 commented on code in PR #22075:
URL: https://github.com/apache/kafka/pull/22075#discussion_r3246051329
##########
core/src/test/scala/unit/kafka/network/RequestConvertToJsonTest.scala:
##########
@@ -59,9 +58,9 @@ class RequestConvertToJsonTest {
val expectedNode = new ObjectNode(JsonNodeFactory.instance)
expectedNode.set("isForwarded", if (req.isForwarded) BooleanNode.TRUE else
BooleanNode.FALSE)
expectedNode.set("requestHeader",
RequestConvertToJson.requestHeaderNode(req.header))
- expectedNode.set("request", req.requestLog.getOrElse(new TextNode("")))
+ expectedNode.set("request", req.requestLog.orElse(new TextNode("")))
Review Comment:
This comment is orthogonal to the PR, but it appears
`NullNode.getInstance()` is more suitable than `new TextNode("")` if the filed
is non-existent
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]