jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1133925 - /jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Date Thu, 09 Jun 2011 15:20:55 GMT
Author: thomasm
Date: Thu Jun  9 15:20:54 2011
New Revision: 1133925

URL: http://svn.apache.org/viewvc?rev=1133925&view=rev
Log:
Workspace names are at level 1

Modified:
    jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java

Modified: jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1133925&r1=1133924&r2=1133925&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Thu Jun  9 15:20:54 2011
@@ -134,16 +134,23 @@ public class RepositoryServiceImpl exten
             String json = microKernel.getNodes("/", 1, rev);
             new JSONParser().parse(json, new JsonHandlerBase(){
                 public String currentKey;
+                private int level;
 
                 @Override
                 public boolean startObject() throws ParseException, IOException {
-                    if (currentKey != null) {
+                    if (level++ == 1 && currentKey != null) {
                         workspaces.add(currentKey);
                     }
                     return true;
                 }
 
                 @Override
+                public boolean endObject() {
+                    level--;
+                    return true;
+                }
+
+                @Override
                 public boolean startObjectEntry(String key) throws ParseException, IOException
{
                     currentKey = key;
                     return true;



Mime
View raw message