jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r766748 - /jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
Date Mon, 20 Apr 2009 16:48:37 GMT
Author: mduerig
Date: Mon Apr 20 16:48:37 2009
New Revision: 766748

URL: http://svn.apache.org/viewvc?rev=766748&view=rev
Log:
1.5: Backported revision 719588 (JCR-1870)

Modified:
    jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java

Modified: jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java?rev=766748&r1=766747&r2=766748&view=diff
==============================================================================
--- jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
(original)
+++ jackrabbit/branches/1.5/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
Mon Apr 20 16:48:37 2009
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.jcr2spi.state;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -88,15 +87,9 @@
             throws ItemNotFoundException, RepositoryException {
         // build new node state from server information
         try {
-            NodeState nodeState;
-            if (entry.getStatus() == Status.INVALIDATED) {
-                // simple reload -> don't use batch-read
-                NodeInfo nInfo = service.getNodeInfo(sessionInfo, nodeId);
-                nodeState = createItemStates(nodeId, Collections.singletonList(nInfo).iterator(),
entry, false);
-            } else {
-                Iterator infos = service.getItemInfos(sessionInfo, nodeId);
-                nodeState = createItemStates(nodeId, infos, entry, false);
-            }
+            Iterator infos = service.getItemInfos(sessionInfo, nodeId);
+            NodeState nodeState = createItemStates(nodeId, infos, entry, false);
+
             if (nodeState == null) {
                 throw new ItemNotFoundException("HierarchyEntry does not belong to any existing
ItemInfo.");
             }
@@ -226,14 +219,12 @@
 
         // deal with all additional ItemInfos that may be present.
         NodeEntry parentEntry = nodeState.getNodeEntry();
-        if (parentEntry.getStatus() != Status.INVALIDATED) {
-            while (itemInfos.hasNext()) {
-                ItemInfo info = (ItemInfo) itemInfos.next();
-                if (info.denotesNode()) {
-                    createDeepNodeState((NodeInfo) info, parentEntry, infos);
-                } else {
-                    createDeepPropertyState((PropertyInfo) info, parentEntry, infos);
-                }
+        while (itemInfos.hasNext()) {
+            ItemInfo info = (ItemInfo) itemInfos.next();
+            if (info.denotesNode()) {
+                createDeepNodeState((NodeInfo) info, parentEntry, infos);
+            } else {
+                createDeepPropertyState((PropertyInfo) info, parentEntry, infos);
             }
         }
         return nodeState;



Mime
View raw message