directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r583777 - /directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
Date Thu, 11 Oct 2007 11:30:38 GMT
Author: pamarcelot
Date: Thu Oct 11 04:30:37 2007
New Revision: 583777

URL: http://svn.apache.org/viewvc?rev=583777&view=rev
Log:
Fix for DIRSTUDIO-223 (NullPointerException raised when adding values in the New Entry Wizard).

Modified:
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java?rev=583777&r1=583776&r2=583777&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
Thu Oct 11 04:30:37 2007
@@ -26,6 +26,8 @@
 import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
+import org.apache.directory.studio.ldapbrowser.core.internal.model.BrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.internal.model.DummyConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
@@ -85,7 +87,7 @@
                 ConnectionEventRegistry.fireConnectionOpened( connections[i], this );
             }
         }
-        
+
         // execute job
         if ( !monitor.errorsReported() )
         {
@@ -256,7 +258,14 @@
 
     protected static String getLockIdentifier( IBrowserConnection browserConnection )
     {
-        return browserConnection.getConnection().getHost() + ":" + browserConnection.getConnection().getPort();
+        if ( browserConnection instanceof BrowserConnection )
+        {
+            return browserConnection.getConnection().getHost() + ":" + browserConnection.getConnection().getPort();
+        }
+        else
+        {
+            return null;
+        }
     }
 
 



Mime
View raw message