directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r520874 - in /directory/shared/trunk/asn1/src: main/java/org/apache/directory/shared/asn1/primitives/OID.java test/java/org/apache/directory/shared/asn1/primitives/OIDTest.java
Date Wed, 21 Mar 2007 13:12:59 GMT
Author: elecharny
Date: Wed Mar 21 06:12:59 2007
New Revision: 520874

URL: http://svn.apache.org/viewvc?view=rev&rev=520874
Log:
Fixed the fix for DIRSERVER-875 (the previous fax wasn't good enough ...)

Modified:
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java
    directory/shared/trunk/asn1/src/test/java/org/apache/directory/shared/asn1/primitives/OIDTest.java

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java?view=diff&rev=520874&r1=520873&r2=520874
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java
Wed Mar 21 06:12:59 2007
@@ -583,7 +583,7 @@
         }
 
         // We must have a dot
-        if ( ( pos + 1 >= bytes.length ) || ( bytes[++pos] != '.' ) )
+        if ( bytes[pos++] != '.' )
         {
             return false;
         }

Modified: directory/shared/trunk/asn1/src/test/java/org/apache/directory/shared/asn1/primitives/OIDTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/test/java/org/apache/directory/shared/asn1/primitives/OIDTest.java?view=diff&rev=520874&r1=520873&r2=520874
==============================================================================
--- directory/shared/trunk/asn1/src/test/java/org/apache/directory/shared/asn1/primitives/OIDTest.java
(original)
+++ directory/shared/trunk/asn1/src/test/java/org/apache/directory/shared/asn1/primitives/OIDTest.java
Wed Mar 21 06:12:59 2007
@@ -270,8 +270,8 @@
         assertFalse( OID.isOID( "0..1" ) );
         assertFalse( OID.isOID( "0..12" ) );
         assertFalse( OID.isOID( "0.a.2" ) );
-        assertFalse( OID.isOID( "0.123456" ) );
-        assertFalse( OID.isOID( "1.123456" ) );
+        assertTrue( OID.isOID( "0.123456" ) );
+        assertTrue( OID.isOID( "1.123456" ) );
     }
 
 



Mime
View raw message