jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1101046 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java
Date Mon, 09 May 2011 14:46:34 GMT
Author: stefan
Date: Mon May  9 14:46:34 2011
New Revision: 1101046

URL: http://svn.apache.org/viewvc?rev=1101046&view=rev
Log:
JCR-2967: SessionItemStateManager.getIdOfRootTransientNodeState() may cause NPE

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java?rev=1101046&r1=1101045&r2=1101046&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java
Mon May  9 14:46:34 2011
@@ -462,15 +462,16 @@ public class SessionItemStateManager
 
         // the nearest common ancestor of all transient states
         // must be either
-        // a) a node state with STATUS_EXISTING_MODIFIED, or
-        // b) the parent node of a property state with STATUS_EXISTING_MODIFIED
+        // a) a node state with STATUS_EXISTING_MODIFIED or STATUS_STALE_DESTROYED, or
+        // b) the parent node of a property state with STATUS_EXISTING_MODIFIED or STATUS_STALE_DESTROYED
 
         // collect all candidates based on above criteria
         Collection<NodeId> candidateIds = new LinkedList<NodeId>();
         try {
             HierarchyManager hierMgr = getHierarchyMgr();
             for (ItemState state : transientStore.values()) {
-                if (state.getStatus() == ItemState.STATUS_EXISTING_MODIFIED) {
+                if (state.getStatus() == ItemState.STATUS_EXISTING_MODIFIED
+                        || state.getStatus() == ItemState.STATUS_STALE_DESTROYED) {
                     NodeId nodeId;
                     if (state.isNode()) {
                         nodeId = (NodeId) state.getId();



Mime
View raw message