directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: svn commit: r1085279 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
Date Fri, 25 Mar 2011 09:00:49 GMT
On 3/25/11 9:20 AM, felixk@apache.org wrote:
> Author: felixk
> Date: Fri Mar 25 08:20:51 2011
> New Revision: 1085279
>
> URL: http://svn.apache.org/viewvc?rev=1085279&view=rev
> Log:
> Compare the value not the type, this is done already using if instanceof.

I'm not sure you need to cast the obj. The equals method only accept an 
Object anyway...

> Modified:
>      directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
>
> Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
> URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java?rev=1085279&r1=1085278&r2=1085279&view=diff
> ==============================================================================
> --- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
(original)
> +++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
Fri Mar 25 08:20:51 2011
> @@ -1040,7 +1040,7 @@ public class Dn implements Iterable<Rdn>
>       {
>           if ( obj instanceof String )
>           {
> -            return normName.equals( obj );
> +            return normName.equals( (String) obj );
>           }
>           else if ( obj instanceof Dn)
>           {
>
>
>


-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com


Mime
View raw message