directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r487400 - /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java
Date Fri, 15 Dec 2006 00:03:48 GMT
Author: elecharny
Date: Thu Dec 14 16:03:47 2006
New Revision: 487400

URL: http://svn.apache.org/viewvc?view=rev&rev=487400
Log:
Fixed a bug when a DN was ending by a coma. It was considered as valid, when it is not

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java?view=diff&rev=487400&r1=487399&r2=487400
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java
Thu Dec 14 16:03:47 2006
@@ -136,13 +136,15 @@
                    }
                    else
                    {
-                       break;
+                       return;
                    }
                }
 
                pos.start++;
            }
            while ( RdnParser.parse( dn, pos, rdn ) != DNUtils.PARSING_ERROR );
+           
+           throw new InvalidNameException( "Bad DN : " + dn );
        }
        else
        {
@@ -188,7 +190,7 @@
                    }
                    else
                    {
-                       break;
+                       return true;
                    }
                }
 
@@ -196,12 +198,9 @@
            }
            while ( RdnParser.isValid( dn, pos, false ) );
            
-           return true;
-       }
-       else
-       {
-           return false;
        }
+
+       return false;
    }
 
 



Mime
View raw message