jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1372797 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: plugins/type/NodeTypeManagerImpl.java util/NodeUtil.java
Date Tue, 14 Aug 2012 09:23:42 GMT
Author: angela
Date: Tue Aug 14 09:23:41 2012
New Revision: 1372797

URL: http://svn.apache.org/viewvc?rev=1372797&view=rev
Log:
minor improvement

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java?rev=1372797&r1=1372796&r2=1372797&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java
Tue Aug 14 09:23:41 2012
@@ -160,7 +160,7 @@ public class NodeTypeManagerImpl impleme
             Tree type = types.getChild(getOakName(name));
             if (type != null) {
                 return new NodeTypeImpl(this, factory, new NodeUtil(
-                        session.getCoreValueFactory(), mapper, type));
+                        type, session.getCoreValueFactory(), mapper));
             }
         }
         throw new NoSuchNodeTypeException(name);
@@ -173,7 +173,7 @@ public class NodeTypeManagerImpl impleme
         if (types != null) {
             for (Tree type : types.getChildren()) {
                 list.add(new NodeTypeImpl(this, factory, new NodeUtil(
-                        session.getCoreValueFactory(), mapper, type)));
+                        type, session.getCoreValueFactory(), mapper)));
 
             }
         }
@@ -275,7 +275,7 @@ public class NodeTypeManagerImpl impleme
         type = types.addChild(oakName);
 
         CoreValueFactory factory = session.getCoreValueFactory();
-        NodeUtil node = new NodeUtil(factory, mapper, type);
+        NodeUtil node = new NodeUtil(type, factory, mapper);
         node.setName(JCR_PRIMARYTYPE, NT_NODETYPE);
         node.setName(JCR_NODETYPENAME, jcrName);
         node.setNames(JCR_SUPERTYPES, ntd.getDeclaredSupertypeNames());

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java?rev=1372797&r1=1372796&r2=1372797&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java
Tue Aug 14 09:23:41 2012
@@ -51,7 +51,7 @@ public class NodeUtil {
 
     private final Tree tree;
 
-    public NodeUtil(CoreValueFactory factory, NameMapper mapper, Tree tree) {
+    public NodeUtil(Tree tree, CoreValueFactory factory, NameMapper mapper) {
         this.factory = factory;
         this.mapper = mapper;
         this.tree = tree;
@@ -74,7 +74,7 @@ public class NodeUtil {
     }
 
     public NodeUtil getParent() {
-        return new NodeUtil(factory, mapper, tree.getParent());
+        return new NodeUtil(tree.getParent(), factory, mapper);
     }
 
     public boolean hasChild(String name) {
@@ -84,13 +84,13 @@ public class NodeUtil {
     @CheckForNull
     public NodeUtil getChild(String name) {
         Tree child = tree.getChild(name);
-        return (child == null) ? null : new NodeUtil(factory, mapper, child);
+        return (child == null) ? null : new NodeUtil(child, factory, mapper);
     }
 
     @Nonnull
     public NodeUtil addChild(String name, String primaryNodeTypeName) {
         Tree child = tree.addChild(name);
-        NodeUtil childUtil = new NodeUtil(factory, mapper, child);
+        NodeUtil childUtil = new NodeUtil(child, factory, mapper);
         childUtil.setName(JcrConstants.JCR_PRIMARYTYPE, primaryNodeTypeName);
         return childUtil;
     }
@@ -203,7 +203,7 @@ public class NodeUtil {
         List<NodeUtil> nodes = Lists.newArrayList();
         for (Tree child : tree.getChildren()) {
             if (child.getName().startsWith(namePrefix)) {
-                nodes.add(new NodeUtil(factory, mapper, child));
+                nodes.add(new NodeUtil(child, factory, mapper));
             }
         }
         return nodes;



Mime
View raw message