jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r772285 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionImpl.java
Date Wed, 06 May 2009 14:45:41 GMT
Author: reschke
Date: Wed May  6 14:45:40 2009
New Revision: 772285

URL: http://svn.apache.org/viewvc?rev=772285&view=rev
Log:
JCR-2058: fix get getLinearSuccessor(), which was failing with NPE on the base version

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionImpl.java?rev=772285&r1=772284&r2=772285&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionImpl.java
Wed May  6 14:45:40 2009
@@ -113,7 +113,7 @@
         InternalVersion base = ((VersionImpl) vn.getBaseVersion()).getInternalVersion();
 
         InternalVersion suc = getInternalVersion().getLinearSuccessor(base);
-        return (Version) session.getNodeById(suc.getId());
+        return suc == null ? null : (Version) session.getNodeById(suc.getId());
     }
 
     /**



Mime
View raw message