jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r125055 - /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java
Date Thu, 13 Jan 2005 10:16:51 GMT
Author: stefan
Date: Thu Jan 13 02:16:50 2005
New Revision: 125055

URL: http://svn.apache.org/viewcvs?view=rev&rev=125055
Log:
fixed NPE that occured occasionally on repository instantiation 
Modified:
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java?view=diff&rev=125055&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java&r1=125054&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java&r2=125055
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java	(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java	Thu
Jan 13 02:16:50 2005
@@ -125,6 +125,7 @@
      */
     private RepositoryImpl(RepositoryConfig repConfig) throws RepositoryException {
         this.repConfig = repConfig;
+
         // setup file systems
         repStore = repConfig.getFileSystem();
         String fsRootPath = "/meta";
@@ -240,6 +241,12 @@
             throw new RepositoryException(msg, fse);
         }
 
+        // load repository properties
+        repProps = new Properties();
+        loadRepProps();
+        nodesCount = Long.parseLong(repProps.getProperty(STATS_NODE_COUNT_PROPERTY, "0"));
+        propsCount = Long.parseLong(repProps.getProperty(STATS_PROP_COUNT_PROPERTY, "0"));
+
         // setup internal transaction manager
         // @todo rewrite to use file system abstraction (FileSystem interface)
         try {
@@ -275,12 +282,6 @@
         SessionImpl verSession = getSystemSession(repConfig.getDefaultWorkspaceName());
         pvMgr = new NativePVM(verSession);
         vMgr = new VersionManagerImpl(pvMgr);
-
-        // load repository properties
-        repProps = new Properties();
-        loadRepProps();
-        nodesCount = Long.parseLong(repProps.getProperty(STATS_NODE_COUNT_PROPERTY, "0"));
-        propsCount = Long.parseLong(repProps.getProperty(STATS_PROP_COUNT_PROPERTY, "0"));
 
         // finally register shutdown hook
         Runtime.getRuntime().addShutdownHook(new Thread() {

Mime
View raw message