directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1670602 - /directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ServerConfigurationEditorUtils.java
Date Wed, 01 Apr 2015 10:35:33 GMT
Author: elecharny
Date: Wed Apr  1 10:35:33 2015
New Revision: 1670602

URL: http://svn.apache.org/r1670602
Log:
Initialized the CacheService to avoid NPE in the OpenLDAP config editor

Modified:
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ServerConfigurationEditorUtils.java

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ServerConfigurationEditorUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ServerConfigurationEditorUtils.java?rev=1670602&r1=1670601&r2=1670602&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ServerConfigurationEditorUtils.java
(original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/ServerConfigurationEditorUtils.java
Wed Apr  1 10:35:33 2015
@@ -37,6 +37,7 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.schema.registries.ObjectClassRegistry;
 import org.apache.directory.api.ldap.util.tree.DnNode;
 import org.apache.directory.api.util.DateUtils;
+import org.apache.directory.server.core.api.CacheService;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.common.ui.CommonUIUtils;
 import org.apache.directory.studio.common.ui.filesystem.PathEditorInput;
@@ -52,7 +53,6 @@ import org.eclipse.swt.widgets.Directory
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.PlatformUI;
-
 import org.apache.directory.studio.openldap.config.ExpandedLdifUtils;
 import org.apache.directory.studio.openldap.config.jobs.EntryBasedConfigurationPartition;
 import org.apache.directory.studio.openldap.config.jobs.PartitionsDiffComputer;
@@ -455,8 +455,12 @@ public class ServerConfigurationEditorUt
     public static EntryBasedConfigurationPartition createConfigurationPartition( SchemaManager
schemaManager,
         Dn configBaseDn ) throws LdapException
     {
+        CacheService cacheService = new CacheService();
+        cacheService.initialize( null );
+
         EntryBasedConfigurationPartition configurationPartition = new EntryBasedConfigurationPartition(
             schemaManager, configBaseDn );
+        configurationPartition.setCacheService(cacheService);
         configurationPartition.initialize();
 
         return configurationPartition;



Mime
View raw message