You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2006/07/08 17:46:45 UTC

svn commit: r420140 - /directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java

Author: elecharny
Date: Sat Jul  8 08:46:45 2006
New Revision: 420140

URL: http://svn.apache.org/viewvc?rev=420140&view=rev
Log:
Added a check on the name, and improved a little bit the method speed

Modified:
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java?rev=420140&r1=420139&r2=420140&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/BootstrapOidRegistry.java Sat Jul  8 08:46:45 2006
@@ -29,6 +29,7 @@
 import org.apache.directory.server.core.schema.OidRegistry;
 import org.apache.directory.server.core.schema.OidRegistryMonitor;
 import org.apache.directory.server.core.schema.OidRegistryMonitorAdapter;
+import org.apache.directory.shared.ldap.util.StringTools;
 
 
 /**
@@ -55,17 +56,17 @@
      */
     public String getOid( String name ) throws NamingException
     {
-        if ( name == null )
+        if ( StringTools.isEmpty( name ) )
         {
-            throw new NamingException( "name should not be null" );
+            throw new NamingException( "name should not be empty" );
         }
         /* If name is an OID than we return it back since inherently the
          * OID is another name for the object referred to by OID and the
          * caller does not know that the argument is an OID String.
          */
-        if ( Character.isDigit( name.charAt( 0 ) ) )
+        if ( StringTools.isDigit( name.charAt( 0 ) ) )
         {
-            monitor.getOidWithOid( name );
+            //monitor.getOidWithOid( name );
             return name;
         }