incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r729281 - /incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/JsonResourceWriter.java
Date Wed, 24 Dec 2008 08:57:49 GMT
Author: cziegeler
Date: Wed Dec 24 00:57:49 2008
New Revision: 729281

URL: http://svn.apache.org/viewvc?rev=729281&view=rev
Log:
SLING-796 : If resource is not adaptable to either ValueMap, Map or String, just output an
empty object.

Modified:
    incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/JsonResourceWriter.java

Modified: incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/JsonResourceWriter.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/JsonResourceWriter.java?rev=729281&r1=729280&r2=729281&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/JsonResourceWriter.java
(original)
+++ incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/JsonResourceWriter.java
Wed Dec 24 00:57:49 2008
@@ -96,7 +96,11 @@
                 w.key(ResourceUtil.getName(resource));
                 w.value(value);
                 w.endObject();
+                return;
             }
+            // we can't even adapt to a string, so just output an empty object
+            w.object();
+            w.endObject();
             return;
         }
         w.object();



Mime
View raw message