jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject svn commit: r1421857 - /jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionSaveOperation.java
Date Fri, 14 Dec 2012 13:34:19 GMT
Author: unico
Date: Fri Dec 14 13:34:19 2012
New Revision: 1421857

URL: http://svn.apache.org/viewvc?rev=1421857&view=rev
Log:
JCR-3486 guard against npe due to transient root being null

Modified:
    jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionSaveOperation.java

Modified: jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionSaveOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionSaveOperation.java?rev=1421857&r1=1421856&r2=1421857&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionSaveOperation.java
(original)
+++ jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/session/SessionSaveOperation.java
Fri Dec 14 13:34:19 2012
@@ -39,7 +39,9 @@ public class SessionSaveOperation implem
         } else {
             id = context.getItemStateManager().getIdOfRootTransientNodeState();
         }
-        context.getItemManager().getItem(id).save();
+        if (id != null) {
+            context.getItemManager().getItem(id).save();
+        }
         return this;
     }
 



Mime
View raw message