directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <fe...@otego.com>
Subject shared.ldap.ldif.LdifEntry.equals not logic
Date Mon, 17 May 2010 16:42:51 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sorry, it's me again ...

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();

and then remove the if from line 784?


[1]
http://people.apache.org/~felixk/shared-docs/xref/org/apache/directory/shared/ldap/ldif/LdifEntry.html#764
[2]
http://people.apache.org/~felixk/shared-docs/xref/org/apache/directory/shared/ldap/ldif/LdifEntry.html#784
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvxcgsACgkQ2lZVCB08qHG7fQCfcOx0ruzbJ66UUPO68fIEnlP3
J1cAn0/x6qcsy1+FXQfJxndDFk1SP1O3
=06i0
-----END PGP SIGNATURE-----

Mime
View raw message