incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1589049 - /sling/trunk/contrib/extensions/resource-inventory/src/main/java/org/apache/sling/resource/inventory/impl/JsonObjectCreator.java
Date Tue, 22 Apr 2014 09:22:39 GMT
Author: cziegeler
Date: Tue Apr 22 09:22:39 2014
New Revision: 1589049

URL: http://svn.apache.org/r1589049
Log:
SLING-3507 : Potential NPE in JSON dump from JMX

Modified:
    sling/trunk/contrib/extensions/resource-inventory/src/main/java/org/apache/sling/resource/inventory/impl/JsonObjectCreator.java

Modified: sling/trunk/contrib/extensions/resource-inventory/src/main/java/org/apache/sling/resource/inventory/impl/JsonObjectCreator.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/resource-inventory/src/main/java/org/apache/sling/resource/inventory/impl/JsonObjectCreator.java?rev=1589049&r1=1589048&r2=1589049&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/resource-inventory/src/main/java/org/apache/sling/resource/inventory/impl/JsonObjectCreator.java
(original)
+++ sling/trunk/contrib/extensions/resource-inventory/src/main/java/org/apache/sling/resource/inventory/impl/JsonObjectCreator.java
Tue Apr 22 09:22:39 2014
@@ -130,8 +130,10 @@ public abstract class JsonObjectCreator 
             return value;
         } else if ( value instanceof Double ) {
             return value;
-        } else {
+        } else if ( value != null ) {
             return value.toString();
+        } else {
+            return ""; // assume empty string
         }
     }
 



Mime
View raw message