directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: shared.ldap.ldif.LdifEntry.equals not logic
Date Mon, 17 May 2010 17:11:15 GMT
On 5/17/10 6:42 PM, Felix Knecht wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sorry, it's me again ...
>    
Nah, that's a great job you are doing ! Good for the code, good for the 
project !
> On line 764 [1] we do 'entry.getDn()' and further down 784 [2] we check
> if entry==null.
> This check is not necessary, because line 764 will throw a NPE in this
> case what is very bad for an equals method. Maybe I'm wrong, but could
> line 764 also look like
>
> if(getEntry()==null) return false;
> DN thisDn = getEntry().getDn();
>    

Ouchh... Good catch. Yeah, obvioulsy the code is wrong.

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



Mime
View raw message