jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1133941 - /jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Date Thu, 09 Jun 2011 15:35:22 GMT
Author: mduerig
Date: Thu Jun  9 15:35:21 2011
New Revision: 1133941

URL: http://svn.apache.org/viewvc?rev=1133941&view=rev
Log:
spi2microkernel prototype (WIP)
undo workspace hack

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=1133941&r1=1133940&r2=1133941&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:35:21 2011
@@ -131,26 +131,19 @@ public class RepositoryServiceImpl exten
         final List<String> workspaces = new ArrayList<String>();
 
         try {
-            String json = microKernel.getNodes("/", 1, rev);
+            String json = microKernel.getNodes("/", 0, rev);
             new JSONParser().parse(json, new JsonHandlerBase(){
                 public String currentKey;
-                private int level;
 
                 @Override
                 public boolean startObject() throws ParseException, IOException {
-                    if (level++ == 1 && currentKey != null) {
+                    if (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;
@@ -449,7 +442,7 @@ public class RepositoryServiceImpl exten
         public void commit() throws RepositoryException {
             String rev = getRevision(sessionInfo);
             // TODO ugly hack:
-            // remove training new line. DiffParser messes up otherwise
+            // remove trailing new line. DiffParser messes up otherwise
             jsop.deleteCharAt(jsop.length() - 1);
             rev = microKernel.commit("/", jsop.toString(), rev);
             setRevision(sessionInfo, rev);



Mime
View raw message