directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r578767 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java
Date Mon, 24 Sep 2007 11:44:30 GMT
Author: elecharny
Date: Mon Sep 24 04:44:29 2007
New Revision: 578767

URL: http://svn.apache.org/viewvc?rev=578767&view=rev
Log:
Fixed a potential NPE in some cases. Switching from Long to long was not a good idea when
the called method can return a null value. My bad.

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java?rev=578767&r1=578766&r2=578767&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java
Mon Sep 24 04:44:29 2007
@@ -345,7 +345,7 @@
                 return 1L;
             
             case ( SearchControls.ONELEVEL_SCOPE  ):
-                long id = db.getEntryId( node.getBaseDn() );
+                Long id = db.getEntryId( node.getBaseDn() );
                 return Long.valueOf( db.getChildCount( id ) );
                 
             case ( SearchControls.SUBTREE_SCOPE  ):



Mime
View raw message