directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1650697 - /directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java
Date Sat, 10 Jan 2015 00:05:26 GMT
Author: elecharny
Date: Sat Jan 10 00:05:25 2015
New Revision: 1650697

URL: http://svn.apache.org/r1650697
Log:
Created and injected the cache service that is necessary for the partition to be loaded, otherwise
we get a NPE at some point while reading the config.ldif file

Modified:
    directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java

Modified: directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java?rev=1650697&r1=1650696&r2=1650697&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java
Sat Jan 10 00:05:25 2015
@@ -41,6 +41,7 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.server.config.ConfigPartitionReader;
 import org.apache.directory.server.config.ReadOnlyConfigurationPartition;
 import org.apache.directory.server.config.beans.ConfigBean;
+import org.apache.directory.server.core.api.CacheService;
 import org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition;
 import org.apache.directory.studio.apacheds.configuration.v2.ApacheDS2ConfigurationPlugin;
 import org.apache.directory.studio.apacheds.configuration.v2.editor.ConnectionServerConfigurationInput;
@@ -222,6 +223,10 @@ public class LoadConfigurationRunnable i
             // Creating a partition associated from the input stream
             ReadOnlyConfigurationPartition configurationPartition = new ReadOnlyConfigurationPartition(
is,
                 ApacheDS2ConfigurationPlugin.getDefault().getSchemaManager() );
+            CacheService cacheService = new CacheService();
+            cacheService.initialize( null );
+            configurationPartition.setCacheService( cacheService );
+
             configurationPartition.initialize();
 
             // Reading the configuration partition



Mime
View raw message