directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r485833 - /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/NumericOidSyntaxChecker.java
Date Mon, 11 Dec 2006 19:20:36 GMT
Author: elecharny
Date: Mon Dec 11 11:20:35 2006
New Revision: 485833

URL: http://svn.apache.org/viewvc?view=rev&rev=485833
Log:
Removed useless code and comment

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/NumericOidSyntaxChecker.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/NumericOidSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/NumericOidSyntaxChecker.java?view=diff&rev=485833&r1=485832&r2=485833
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/NumericOidSyntaxChecker.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/syntax/NumericOidSyntaxChecker.java
Mon Dec 11 11:20:35 2006
@@ -23,6 +23,7 @@
 import javax.naming.NamingException;
 
 
+import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -112,23 +113,8 @@
         {
             return false;
         }
-        
-        // if the first character is a digit it's an attempt at an OID and must be
-        // checked to make sure there are no other chars except '.' and digits.
-        if ( Character.isDigit( strValue.charAt( 0 ) ) )
-        {
-            if ( ! org.apache.directory.shared.asn1.primitives.OID.isOID( strValue ) )
-            {
-                return false;
-            }
-            else
-            {
-                return true;
-            }
-        }
-        else
-        {
-            return false;
-        }
+
+        // Just check that the valuse is a valid OID
+        return ( OID.isOID( strValue ) );
     }
 }



Mime
View raw message