jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1221730 - in /jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit: Path.java state/TransientSpace.java
Date Wed, 21 Dec 2011 13:54:41 GMT
Author: mduerig
Date: Wed Dec 21 13:54:41 2011
New Revision: 1221730

URL: http://svn.apache.org/viewvc?rev=1221730&view=rev
Log:
Microkernel based prototype of JCR implementation (WIP)
Use lazy path element decomposing  

Modified:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/Path.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/Path.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/Path.java?rev=1221730&r1=1221729&r2=1221730&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/Path.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/Path.java
Wed Dec 21 13:54:41 2011
@@ -104,8 +104,8 @@ public class Path {
             : PathUtils.getName(path);
     }
 
-    public String[] getNames() {
-        return PathUtils.split(path);
+    public Iterable<String> getNames() {
+        return PathUtils.elements(path);
     }
 
     public int getDepth() {

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java?rev=1221730&r1=1221729&r2=1221730&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java
Wed Dec 21 13:54:41 2011
@@ -124,9 +124,8 @@ public class TransientSpace {
             }
 
             private NodeDelta getOrCreateNodeDelta(Path path) throws PathNotFoundException
{
-                String[] names = path.getNames();
                 NodeDelta delta = root;
-                for (String name : names) {
+                for (String name : path.getNames()) {
                     if (delta.hasChildNode(name)) {
                         delta = delta.getChildNode(name);
                     }
@@ -163,9 +162,8 @@ public class TransientSpace {
             return new NodeDelta(path, path);
         }
 
-        String[] names = path.getNames();
         NodeDelta delta = root;
-        for (String name : names) {
+        for (String name : path.getNames()) {
             if (delta.hasRemovedNode(name)) {
                 return null;
             }



Mime
View raw message