thomasmueller commented on a change in pull request #470:
URL: https://github.com/apache/jackrabbit-oak/pull/470#discussion_r788449391



##########
File path: 
oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/json/JsopBuilder.java
##########
@@ -208,12 +210,20 @@ public JsopBuilder value(String value) {
      */
     @Override
     public JsopBuilder encodedValue(String value) {
-        optionalCommaAndNewline(value.length());
+        optionalCommaAndNewline(strLength(value));
         buff.append(value);
         needComma = true;
         return this;
     }
 
+    private int strLength(@Nullable String value) {
+        if (value != null) {
+            return value.length();
+        } else {
+            return 4;// null = 4 chars

Review comment:
       Suggested change:
   
               return "null".length();
   




-- 
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]


Reply via email to