directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r749045 - /directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsRunnable.java
Date Sun, 01 Mar 2009 15:22:49 GMT
Author: seelmann
Date: Sun Mar  1 15:22:49 2009
New Revision: 749045

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

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

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsRunnable.java?rev=749045&r1=749044&r2=749045&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsRunnable.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsRunnable.java
Sun Mar  1 15:22:49 2009
@@ -101,20 +101,17 @@
         InitializeAttributesRunnable.initializeAttributes( rootDSE, true, monitor );
 
         IEntry[] baseDNEntries = connection.getRootDSE().getChildren();
-        for ( IEntry baseDNEntry : baseDNEntries )
+        if ( baseDNEntries != null )
         {
-            if ( !( baseDNEntry instanceof DirectoryMetadataEntry ) )
+            for ( IEntry baseDNEntry : baseDNEntries )
             {
-                baseDNs.add( baseDNEntry.getDn().getUpName() );
+                if ( !( baseDNEntry instanceof DirectoryMetadataEntry ) )
+                {
+                    baseDNs.add( baseDNEntry.getDn().getUpName() );
+                }
             }
         }
 
-//        IAttribute attribute = rootDSE.getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_NAMINGCONTEXTS
);
-//        if ( attribute != null )
-//        {
-//            baseDNs = attribute.getStringValues();
-//        }
-
         monitor.worked( 1 );
     }
 



Mime
View raw message