Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 14691 invoked from network); 17 May 2010 16:43:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 May 2010 16:43:22 -0000 Received: (qmail 88806 invoked by uid 500); 17 May 2010 16:43:22 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 88685 invoked by uid 500); 17 May 2010 16:43:22 -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 88674 invoked by uid 99); 17 May 2010 16:43:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 May 2010 16:43:22 +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.32] (HELO viefep12-int.chello.at) (62.179.121.32) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 May 2010 16:43:14 +0000 Received: from edge04.upcmail.net ([192.168.13.239]) by viefep12-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20100517164253.YTDF8481.viefep12-int.chello.at@edge04.upcmail.net> for ; Mon, 17 May 2010 18:42:53 +0200 Received: from [192.168.1.50] ([84.74.100.246]) by edge04.upcmail.net with edge id Jgir1e0B05JxopQ04gitS7; Mon, 17 May 2010 18:42:53 +0200 X-SourceIP: 84.74.100.246 Message-ID: <4BF1720B.6060201@otego.com> Date: Mon, 17 May 2010 18:42:51 +0200 From: Felix Knecht 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: shared.ldap.ldif.LdifEntry.equals not logic 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=K3uBg944YaUT+Qsu6bWO0a0V3uPy4DQNslbdoMCD4tw= c=1 sm=0 a=9MCY1DwnbJcA:10 a=ood2b7iyd8MA:10 a=8nJEP1OIZ-IA:10 a=mV9VRH-2AAAA:8 a=xe8BsctaAAAA:8 a=-LvqF2cx_nnsJIUQao8A:9 a=_rgf10_mKd2PWZ2RXVMA:7 a=Z7mnBiwJCGTbUdPWz-6vbOo2TgYA: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 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-----