jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1059803 - /jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Date Mon, 17 Jan 2011 08:18:14 GMT
Author: thomasm
Date: Mon Jan 17 08:18:13 2011
New Revision: 1059803

URL: http://svn.apache.org/viewvc?rev=1059803&view=rev
Log:
JCR-2862 Jackrabbit logs a NullPointerException on shutdown if the version manager wasn't
initialized

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

Modified: jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=1059803&r1=1059802&r2=1059803&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/branches/2.2/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Mon Jan 17 08:18:13 2011
@@ -102,6 +102,7 @@ import org.apache.jackrabbit.core.state.
 import org.apache.jackrabbit.core.state.ManagedMLRUItemStateCacheFactory;
 import org.apache.jackrabbit.core.state.SharedItemStateManager;
 import org.apache.jackrabbit.core.util.RepositoryLockMechanism;
+import org.apache.jackrabbit.core.version.InternalVersionManager;
 import org.apache.jackrabbit.core.version.InternalVersionManagerImpl;
 import org.apache.jackrabbit.core.xml.ClonedInputSource;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
@@ -1113,7 +1114,10 @@ public class RepositoryImpl extends Abst
         }
 
         try {
-            context.getInternalVersionManager().close();
+            InternalVersionManager m = context.getInternalVersionManager();
+            if (m != null) {
+                m.close();
+            }
         } catch (Exception e) {
             log.error("Error while closing Version Manager.", e);
         }



Mime
View raw message