Re: svn commit: r596800 - /directory/shared/branches/bigbang/ldap/src/main/java/org/ap
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Directory Project > Re: svn commit: r596800 - /directory/shared/branches/bigbang/ldap/src/main/java/org/ap




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: svn commit: r596800 - /directory/shared/branches/bigbang/ldap/src/main/java/org/ap  
Emmanuel Lecharny


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-21-07 12:11 AM


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

Thanks !

felixk-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org 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 useles
s result such as [C@16f0472. Consider using Arrays.toString to convert t
he array into a readable String that gives the contents of the array.
>
> Modified:
>     directory/shared/branches/bigbang/ldap/src/main/java/org/apache/direct
ory/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/direct...96800&view=diff
>  ========================================
==================================
====
> --- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/direct
ory/shared/ldap/name/LdapDnParser.java (original)
> +++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/direct
ory/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 : " + Arra
ys.toString( dn ) );
>                     }
>                     else
>                     {
> @@ -162,11 +163,11 @@
>             }
>             while ( RdnParser.parse( dn, pos, rdn ) != DNUtils.PARSING_ERR
OR );
>
> -           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








[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:51 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register