directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1176383 - /directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/DeleteLdapServerRunnable.java
Date Tue, 27 Sep 2011 13:48:03 GMT
Author: pamarcelot
Date: Tue Sep 27 13:48:02 2011
New Revision: 1176383

URL: http://svn.apache.org/viewvc?rev=1176383&view=rev
Log:
Fixed a NPE.

Modified:
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/DeleteLdapServerRunnable.java

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/DeleteLdapServerRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/DeleteLdapServerRunnable.java?rev=1176383&r1=1176382&r2=1176383&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/DeleteLdapServerRunnable.java
(original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/DeleteLdapServerRunnable.java
Tue Sep 27 13:48:02 2011
@@ -27,6 +27,7 @@ import org.apache.directory.studio.commo
 import org.apache.directory.studio.common.core.jobs.StudioRunnableWithProgress;
 import org.apache.directory.studio.ldapservers.LdapServersManager;
 import org.apache.directory.studio.ldapservers.model.LdapServer;
+import org.apache.directory.studio.ldapservers.model.LdapServerAdapter;
 import org.apache.directory.studio.ldapservers.model.LdapServerStatus;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.osgi.util.NLS;
@@ -113,7 +114,11 @@ public class DeleteLdapServerRunnable im
             deleteDirectory( LdapServersManager.getServerFolder( server ).toFile() );
 
             // Letting the LDAP Server Adapter finish the deletion of the server
-            server.getLdapServerAdapterExtension().getInstance().delete( server, monitor
);
+            LdapServerAdapter ldapServerAdapter = server.getLdapServerAdapterExtension().getInstance();
+            if ( ldapServerAdapter != null )
+            {
+                ldapServerAdapter.delete( server, monitor );
+            }
         }
         catch ( InterruptedException e )
         {



Mime
View raw message