Very good catch, Felix !!! I missed the point when I changed the code last month.

Thanks !

[EMAIL PROTECTED] wrote:
Author: felixk
Date: Tue Nov 20 11:46:03 2007
New Revision: 596800

URL: http://svn.apache.org/viewvc?rev=596800&view=rev
Log:
Invocation of toString on an array

The code invokes toString on an array, which will generate a fairly useless result such as [EMAIL PROTECTED] Consider using Arrays.toString to convert the array into a readable String that gives the contents of the array.
Modified:
    
directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java

Modified: 
directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java
URL: 
http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java?rev=596800&r1=596799&r2=596800&view=diff
==============================================================================
--- 
directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java
 (original)
+++ 
directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java
 Tue Nov 20 11:46:03 2007
@@ -20,6 +20,7 @@
 package org.apache.directory.shared.ldap.name;
+import java.util.Arrays;
 import java.util.List;
import javax.naming.InvalidNameException;
@@ -150,7 +151,7 @@
if ( pos.start != dn.length )
                    {
-                       throw new InvalidNameException( "Bad DN : " + dn );
+                       throw new InvalidNameException( "Bad DN : " + 
Arrays.toString( dn ) );
                    }
                    else
                    {
@@ -162,11 +163,11 @@
            }
            while ( RdnParser.parse( dn, pos, rdn ) != DNUtils.PARSING_ERROR );
- throw new InvalidNameException( "Bad DN : " + dn );
+           throw new InvalidNameException( "Bad DN : " + Arrays.toString( dn ) 
);
        }
        else
        {
-           throw new InvalidNameException( "Bad DN : " + dn );
+           throw new InvalidNameException( "Bad DN : " + Arrays.toString( dn ) 
);
        }
    }




--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org


Reply via email to