Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 20187 invoked from network); 17 May 2010 17:11:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 May 2010 17:11:39 -0000 Received: (qmail 37705 invoked by uid 500); 17 May 2010 17:11:39 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 37671 invoked by uid 500); 17 May 2010 17:11:39 -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 37664 invoked by uid 99); 17 May 2010 17:11:39 -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 17:11:39 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 74.125.82.178 as permitted sender) Received: from [74.125.82.178] (HELO mail-wy0-f178.google.com) (74.125.82.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 May 2010 17:11:31 +0000 Received: by wyj26 with SMTP id 26so2186405wyj.37 for ; Mon, 17 May 2010 10:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=4qMLjTsRxfQrzh6aZgcKNP9ImM/Z58em6m3IMfkYg1E=; b=toR+2fKmXu3Yai2LzsvoEKE1Hvn9xnaB8DG8RjReBOJxgdS5qb4SX6C7VVGtzzpbM7 6ob8fkTrJCEza4HRWa6Q6pNQt6fUfrkZ+/2Vdp0qrASl7uw0OqIy5LVBIZosg2zTpOTj JC1dTo8EAyTD+hIqrrqd2mMLdR/wuo55iTylo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=VF/Aw3pXj0lRjx5KhXcyzeRcqlA0NU3bjYN8iR4NeGHXuZ1G2r7jkGzCC0ELgtObNy 3bknkDgI3Wo29P0FQMvrbU4wzrF0y0wEhNNc/9iKJhzjT6OB9klt4BYIwQ2fi/+JxCxe ex8uHoq98jbW0mRJWwsaZypea4YpS0RJMPcOI= Received: by 10.216.176.194 with SMTP id b44mr3293401wem.124.1274116270582; Mon, 17 May 2010 10:11:10 -0700 (PDT) Received: from emmanuel-lecharnys-MacBook-Pro.local (vol75-3-82-66-216-176.fbx.proxad.net [82.66.216.176]) by mx.google.com with ESMTPS id k13sm1898760wed.23.2010.05.17.10.11.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 17 May 2010 10:11:09 -0700 (PDT) Message-ID: <4BF178B3.8040604@gmail.com> Date: Mon, 17 May 2010 19:11:15 +0200 From: Emmanuel Lecharny Reply-To: elecharny@apache.org User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 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> In-Reply-To: <4BF1720B.6060201@otego.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org 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