Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 29093 invoked from network); 20 May 2010 08:21:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 May 2010 08:21:58 -0000 Received: (qmail 15430 invoked by uid 500); 20 May 2010 08:21:58 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 15320 invoked by uid 500); 20 May 2010 08:21:58 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 15313 invoked by uid 99); 20 May 2010 08:21:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 08:21:58 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [62.179.121.34] (HELO viefep14-int.chello.at) (62.179.121.34) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 08:21:50 +0000 Received: from edge04.upcmail.net ([192.168.13.239]) by viefep14-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20100520082128.PRKX18535.viefep14-int.chello.at@edge04.upcmail.net> for ; Thu, 20 May 2010 10:21:28 +0200 Received: from [192.168.1.50] ([84.74.100.246]) by edge04.upcmail.net with edge id KkMS1e0885JxopQ04kMUk5; Thu, 20 May 2010 10:21:28 +0200 X-SourceIP: 84.74.100.246 Message-ID: <4BF4F106.1040606@apache.org> Date: Thu, 20 May 2010 10:21:26 +0200 From: Felix Knecht Reply-To: felixk@apache.org User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100509 Thunderbird/3.0.4 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: shared.ldap.ldif.LdifEntry.equals not logic References: <4BF1720B.6060201@otego.com> <4BF172AC.1090703@apache.org> In-Reply-To: <4BF172AC.1090703@apache.org> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=M71sKKeyFebLYdq5hFNIGMR02ATQkL1qNhm49ttUYSY= c=1 sm=0 a=GiEJCGfGYqwA:10 a=0qYQvVkOOIcA:10 a=pXoq77xVGrQA:10 a=8nJEP1OIZ-IA:10 a=mV9VRH-2AAAA:8 a=xe8BsctaAAAA:8 a=9RzeiBdk8_oEsgCKbTcA:9 a=bnK6YWMgvkVb9Zk7XI0A:7 a=AOgFNh2VIyXgDd6ArSxspPfGiVAA:4 a=wPNLvfGTeEIA:10 a=exNZ7x4igJwA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ping Sorry, but I don't know how to solve and if my suggestion is fitting. Felix On 05/17/10 18:45, Felix Knecht wrote: > On 05/17/10 18:42, Felix Knecht wrote: >> 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? > > There's a similar problem in the hashCode method (lines 672 / 686) > > > >> [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/ iEYEARECAAYFAkv08QYACgkQ2lZVCB08qHEtBwCfcx0+SBO3OCiBYOGGthVVrCfG dVQAoNrZVMFMDjaodMG802kWiRt5E+/W =w3Gr -----END PGP SIGNATURE-----