directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r905340 - /directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java
Date Mon, 01 Feb 2010 17:13:06 GMT
Author: pamarcelot
Date: Mon Feb  1 17:13:06 2010
New Revision: 905340

URL: http://svn.apache.org/viewvc?rev=905340&view=rev
Log:
Fix for DIRSTUDIO-623 (NPE in the ModificationLogsViewUniversalListener under rare circumstances
when selecting a connection).
Added one more check.

Modified:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java?rev=905340&r1=905339&r2=905340&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java
Mon Feb  1 17:13:06 2010
@@ -142,13 +142,14 @@
         if ( this.input != input && input.getBrowserConnection().getConnection()
!= null )
         {
             this.input = input;
+
+            LdifModificationLogger modificationLogger = ConnectionCorePlugin.getDefault().getLdifModificationLogger();
+
             if ( ( input != null ) && ( input.getBrowserConnection() != null )
-                && ( input.getBrowserConnection().getConnection() != null ) )
+                && ( input.getBrowserConnection().getConnection() != null ) &&
( modificationLogger != null ) )
             {
                 // load file %u %g
                 StringBuffer sb = new StringBuffer();
-                LdifModificationLogger modificationLogger = ConnectionCorePlugin.getDefault()
-                    .getLdifModificationLogger();
                 File[] files = modificationLogger.getFiles( input.getBrowserConnection().getConnection()
);
                 int i = input.getIndex();
                 if ( 0 <= i && i < files.length && files[i] != null
&& files[i].exists() && files[i].canRead() )



Mime
View raw message