directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r208738 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/primitives/LdapDN.java
Date Fri, 01 Jul 2005 09:17:50 GMT
Author: elecharny
Date: Fri Jul  1 02:17:49 2005
New Revision: 208738

URL: http://svn.apache.org/viewcvs?rev=208738&view=rev
Log:
Changed the call to DNUtils methods that has been moved to StringUtils

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/primitives/LdapDN.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/primitives/LdapDN.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/primitives/LdapDN.java?rev=208738&r1=208737&r2=208738&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/primitives/LdapDN.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/primitives/LdapDN.java
Fri Jul  1 02:17:49 2005
@@ -80,7 +80,7 @@
     private static int parseSpaces( byte[] bytes, int pos )
     {
 
-        while ( DNUtils.isCharASCII( bytes, pos, ' ' ) )
+        while ( StringUtils.isCharASCII( bytes, pos, ' ' ) )
         {
             pos++;
         }
@@ -102,7 +102,7 @@
      */
     private static int parseAttributeValue( byte[] bytes, int pos )
     {
-        if ( DNUtils.isCharASCII( bytes, pos, '#' ) )
+        if ( StringUtils.isCharASCII( bytes, pos, '#' ) )
         {
             pos++;
 
@@ -115,7 +115,7 @@
 
             return parseSpaces( bytes, pos );
         }
-        else if ( DNUtils.isCharASCII( bytes, pos, '"' ) )
+        else if ( StringUtils.isCharASCII( bytes, pos, '"' ) )
         {
             pos++;
             int nbBytes = 0;
@@ -124,7 +124,7 @@
             // <quotechar-or-pairs>    ::= <quotechar> <quotechar-or-pairs>
| '\' <pairchar> <quotechar-or-pairs> | e
             while ( true )
             {
-                if ( DNUtils.isCharASCII( bytes, pos, '\\' ) )
+                if ( StringUtils.isCharASCII( bytes, pos, '\\' ) )
                 {
                     pos++;
 
@@ -147,7 +147,7 @@
                 }
             }
 
-            if ( DNUtils.isCharASCII( bytes, pos, '"' ) )
+            if ( StringUtils.isCharASCII( bytes, pos, '"' ) )
             {
                 pos++;
 
@@ -162,7 +162,7 @@
         {
             while ( true )
             {
-                if ( DNUtils.isCharASCII( bytes, pos, '\\' ) )
+                if ( StringUtils.isCharASCII( bytes, pos, '\\' ) )
                 {
                     // '\' <pairchar> <pairs-or-strings>
                     pos++;
@@ -187,12 +187,12 @@
                         // we MUST skip them.
                         int initPos = pos;
 
-                        if ( DNUtils.isCharASCII( bytes, pos, ' ') )
+                        if ( StringUtils.isCharASCII( bytes, pos, ' ') )
                         {
                             pos = parseSpaces( bytes, pos );
 
                             if ( ( DNUtils.isStringChar( bytes, pos ) == -1 ) &&
-                                    ( DNUtils.isCharASCII( bytes, pos, '\\' ) == false )
)
+                                    ( StringUtils.isCharASCII( bytes, pos, '\\' ) == false
) )
                             {
                                 // Ok, we are done with the stringchar.
                                 return pos;
@@ -226,8 +226,8 @@
     private static int parseOidPrefix( byte[] bytes, int pos )
     {
 
-        if ( ( DNUtils.areEquals( bytes, pos, OID_LOWER ) == -1 ) &&
-                ( DNUtils.areEquals( bytes, pos, OID_UPPER ) == -1 ) )
+        if ( ( StringUtils.areEquals( bytes, pos, OID_LOWER ) == -1 ) &&
+                ( StringUtils.areEquals( bytes, pos, OID_UPPER ) == -1 ) )
         {
 
             return -1;
@@ -253,7 +253,7 @@
     private static int parseOidValue(byte[] bytes, int pos)
     {
         // <attributType> ::= [0-9] <digits> <oids>
-        if ( DNUtils.isDigit( bytes, pos ) == false )
+        if ( StringUtils.isDigit( bytes, pos ) == false )
         {
 
             // Nope... An error
@@ -265,13 +265,13 @@
             // Let's process an oid
             pos++;
 
-            while ( DNUtils.isDigit( bytes, pos ) )
+            while ( StringUtils.isDigit( bytes, pos ) )
             {
                 pos++;
             }
 
             // <oids> ::= '.' [0-9] <digits> <oids> | e
-            if ( DNUtils.isCharASCII( bytes, pos, '.' ) == false )
+            if ( StringUtils.isCharASCII( bytes, pos, '.' ) == false )
             {
 
                 return pos;
@@ -283,7 +283,7 @@
                 {
                     pos++;
 
-                    if ( DNUtils.isDigit( bytes, pos ) == false )
+                    if ( StringUtils.isDigit( bytes, pos ) == false )
                     {
 
                         return -1;
@@ -292,13 +292,13 @@
                     {
                         pos++;
 
-                        while ( DNUtils.isDigit( bytes, pos ) )
+                        while ( StringUtils.isDigit( bytes, pos ) )
                         {
                             pos++;
                         }
                     }
                 }
-                while ( DNUtils.isCharASCII( bytes, pos, '.' ) );
+                while ( StringUtils.isCharASCII( bytes, pos, '.' ) );
 
                 return pos;
             }
@@ -323,7 +323,7 @@
 
         // <attributType> ::= [a-zA-Z] <keychars> | <oidPrefix> [0-9] <digits>
<oids> | [0-9] <digits> <oids>
     	
-        if ( DNUtils.isAlphaASCII( bytes, pos ))
+        if ( StringUtils.isAlphaASCII( bytes, pos ))
         {
             // <attributType> ::= [a-zA-Z] <keychars> | <oidPrefix> [0-9]
<digits> <oids> 
 
@@ -341,7 +341,7 @@
                 // <keychars>       ::= [a-zA-Z] <keychar> | [0-9] <keychar>
| '-' <keychar> | e
                 pos = oldPos + 1;
 
-                while ( ( DNUtils.parseCharASCII( bytes, pos ) != -1 ) )
+                while ( StringUtils.isAlphaDigitMinus( bytes, pos ) )
                 {
                     pos++;
                 }
@@ -375,7 +375,7 @@
         {
             pos = parseSpaces( bytes, pos );
 
-            if ( DNUtils.isCharASCII( bytes, pos, '+' ) )
+            if ( StringUtils.isCharASCII( bytes, pos, '+' ) )
             {
                 pos++;
             }
@@ -396,7 +396,7 @@
 
             pos = parseSpaces( bytes, pos );
 
-            if ( DNUtils.isCharASCII( bytes, pos, '=' ) )
+            if ( StringUtils.isCharASCII( bytes, pos, '=' ) )
             {
                 pos++;
             }
@@ -433,7 +433,7 @@
 
         pos = parseSpaces( bytes, pos );
 
-        if ( DNUtils.isCharASCII( bytes, pos, '=' ) == false )
+        if ( StringUtils.isCharASCII( bytes, pos, '=' ) == false )
         {
 
             return -1;
@@ -491,8 +491,8 @@
             do
             {
 
-                if ( ( DNUtils.isCharASCII( bytes, pos, ',' ) == false ) &&
-                        ( DNUtils.isCharASCII( bytes, pos, ';' ) == false ) )
+                if ( ( StringUtils.isCharASCII( bytes, pos, ',' ) == false ) &&
+                        ( StringUtils.isCharASCII( bytes, pos, ';' ) == false ) )
                 {
 
                     break;



Mime
View raw message