jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1177340 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
Date Thu, 29 Sep 2011 15:51:27 GMT
Author: reschke
Date: Thu Sep 29 15:51:27 2011
New Revision: 1177340

URL: http://svn.apache.org/viewvc?rev=1177340&view=rev
Log:
JCR-3086: fix potential infinite loop around InternalVersionImpl.getSuccessors

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java?rev=1177340&r1=1177339&r2=1177340&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
Thu Sep 29 15:51:27 2011
@@ -111,6 +111,7 @@ class InternalVersionHistoryImpl extends
             throws RepositoryException {
         super(vMgr, node);
         init();
+        fixLegacy();
     }
 
     /**
@@ -160,8 +161,11 @@ class InternalVersionHistoryImpl extends
             }
             nameCache.put(child.getName(), child.getId());
         }
+    }
+
 
-        // fix legacy
+    // fix legacy
+    private void fixLegacy() throws RepositoryException {
         if (rootVersion.getSuccessors().isEmpty()) {
             for (Name versionName : nameCache.keySet()) {
                 InternalVersionImpl v = createVersionInstance(versionName);



Mime
View raw message