jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r633405 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java
Date Tue, 04 Mar 2008 09:40:25 GMT
Author: mreutegg
Date: Tue Mar  4 01:40:21 2008
New Revision: 633405

URL: http://svn.apache.org/viewvc?rev=633405&view=rev
Log:
JCR-1275: NullPointerException in AbstractVersionManager.createVersionHistory()

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java?rev=633405&r1=633404&r2=633405&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/AbstractVersionManager.java
Tue Mar  4 01:40:21 2008
@@ -36,6 +36,7 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.Value;
+import javax.jcr.InvalidItemStateException;
 import javax.jcr.version.VersionException;
 import javax.jcr.version.VersionHistory;
 
@@ -308,6 +309,9 @@
                     root.store();
                 }
                 root = root.getNode(name, 1);
+                if (root == null) {
+                    throw new InvalidItemStateException();
+                }
             }
             Name historyNodeName = NameFactoryImpl.getInstance().create(Name.NS_DEFAULT_URI,
uuid);
             if (root.hasNode(historyNodeName)) {



Mime
View raw message