incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r918067 - /sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/JsonRendererServlet.java
Date Tue, 02 Mar 2010 15:06:34 GMT
Author: cziegeler
Date: Tue Mar  2 15:06:33 2010
New Revision: 918067

URL: http://svn.apache.org/viewvc?rev=918067&view=rev
Log:
Fix indenting

Modified:
    sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/JsonRendererServlet.java

Modified: sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/JsonRendererServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/JsonRendererServlet.java?rev=918067&r1=918066&r2=918067&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/JsonRendererServlet.java
(original)
+++ sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/JsonRendererServlet.java
Tue Mar  2 15:06:33 2010
@@ -100,7 +100,7 @@
             traversor.check();
         } catch (RecursionTooDeepException e) {
             allowDump = false;
-            allowedLevel = Integer.parseInt(e.getMessage()); // this is to avoid depending
on a SNAPSHOT version of the SLing API. 
+            allowedLevel = Integer.parseInt(e.getMessage()); // this is to avoid depending
on a SNAPSHOT version of the SLing API.
         } catch (RepositoryException e) {
             reportException(e);
         } catch (JSONException e) {
@@ -109,12 +109,12 @@
         try {
             // Check if we can dump the resource.
             if (allowDump) {
-              if (tidy) {
-                resp.getWriter().write(traversor.getJSONObject().toString(2));
-              } else {
-                resp.getWriter().write(traversor.getJSONObject().toString());
-              }
-               
+                if (tidy) {
+                    resp.getWriter().write(traversor.getJSONObject().toString(2));
+                } else {
+                    resp.getWriter().write(traversor.getJSONObject().toString());
+                }
+
             } else {
                 // We are not allowed to do the dump.
                 // Send a 300
@@ -123,11 +123,10 @@
                 JSONWriter writer = new JSONWriter(resp.getWriter());
                 writer.array();
                 while (allowedLevel >= 0) {
-                  writer.value(r.getResourceMetadata().getResolutionPath() + "." + tidyUrl
+ allowedLevel + ".json");
-                  allowedLevel--;
+                    writer.value(r.getResourceMetadata().getResolutionPath() + "." + tidyUrl
+ allowedLevel + ".json");
+                    allowedLevel--;
                 }
                 writer.endArray();
-                return;
             }
         } catch (JSONException je) {
             reportException(je);



Mime
View raw message