Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 84270 invoked from network); 21 May 2009 07:51:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 May 2009 07:51:49 -0000 Received: (qmail 74680 invoked by uid 500); 21 May 2009 07:52:02 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 74619 invoked by uid 500); 21 May 2009 07:52:02 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 74611 invoked by uid 99); 21 May 2009 07:52:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 May 2009 07:52:02 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.136.44.57] (HELO smtp102.prem.mail.sp1.yahoo.com) (98.136.44.57) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 21 May 2009 07:51:52 +0000 Received: (qmail 29109 invoked from network); 21 May 2009 07:51:32 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer; b=UVHc9J2fHSv6b8Zm9GGTjjbUoj4khjRZlm7lHGtIHdtxomsVo0MRNJ0Jq5UHpcleqbEVqEvd+jjRu3+4O+Wfr2CN/FQ8nG5kBF0x5+XVz7BWsnbg9xvf6vEBJiA3xxiai4Nex8V5+3JW9Drsy/VjxCKduQmmFEGnPjBOZL0Urf4= ; Received: from 076-076-148-215.pdx.net (david_jencks@76.76.148.215 with plain) by smtp102.prem.mail.sp1.yahoo.com with SMTP; 21 May 2009 00:51:31 -0700 PDT X-Yahoo-SMTP: .9oIUzyswBANsYgUm_5uPui0skTnzGJXJQ-- X-YMail-OSG: ibKPFCcVM1myMZmEyKIkrq08IHsS2cWzNetDJ8lMo2JLFWuNOiT54UaPVmWkMwG9UVGRXPPKHqexFuOVjWMakqqMJsOueSY2qZmvtdEtjV6ZXsa7u5KYDEOJUM6z8trOGa4YSFeR09I_tOSM8NXLGGU3PHluVCP1SnooXO7.MvK4uxMTwW.m8lqrIUwaUuas_sIvSlMYyOVlfoNRaSafFS5kEBMI3px32q22FUhDDxe91JAfNvz1b8R9N04UhmQ7.YPkt72KHKIGzF8n26FxlV10SApDb7swHqNbeNbk9ShysQzMwTm7HGb8dCawIuh1qK3zjZd1PfuCDXxReO8P X-Yahoo-Newman-Property: ymail-3 Message-Id: From: David Jencks To: user@geronimo.apache.org In-Reply-To: <23648828.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: NullPointerException MultiPoolConnectionInterceptor$SubjectCRIKey.equals Date: Thu, 21 May 2009 00:51:29 -0700 References: <23634940.post@talk.nabble.com> <708FA2DA-EA56-4B33-8984-DC34E43D61FE@yahoo.com> <23648828.post@talk.nabble.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org I'm a little confused. What code did you apply javap to? I dont think I pushed a copy of the newly revised code to any repos so you'd have to build it yourself. The new code looks like this: public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SubjectCRIKey that = (SubjectCRIKey) o; if (hashcode != that.hashcode) return false; if (cri != null ? !cri.equals(that.cri) : that.cri != null) return false; if (subject != null ? !subject.equals(that.subject) : that.subject != null) return false; return true; } I can believe the old code resembled your deconstruction below with the addition of a "return". thanks david jencks On May 21, 2009, at 12:08 AM, Bert_nor wrote: > > I think this is a compiler bug. > javap gives next code: > ........... > 26: getfield #2; //Field subject:Ljavax/security/auth/Subject; > 29: ifnonnull 42 > 32: aload_2 > 33: getfield #2; //Field subject:Ljavax/security/auth/Subject; > 36: ifnonnull 91 > 39: goto 87 > 42: aload_0 > 43: getfield #2; //Field subject:Ljavax/security/auth/Subject; > 46: aload_2 > 47: getfield #2; //Field subject:Ljavax/security/auth/Subject; > 50: invokevirtual #8; //Method > javax/security/auth/Subject.equals:(Ljava/lang/Object;)Z > 53: ifeq 73 <--------------------- > if(subject.equals(o.subject)) > 56: aload_0 > 57: getfield #3; //Field > cri:Ljavax/resource/spi/ConnectionRequestInfo; > 60: ifnonnull 73 > 63: aload_2 > 64: getfield #3; //Field > cri:Ljavax/resource/spi/ConnectionRequestInfo; > 67: ifnonnull 91 > 70: goto 87 > 73: aload_0 <---------------------- > 74: getfield #3; //Field > cri:Ljavax/resource/spi/ConnectionRequestInfo; > 77: aload_2 > 78: getfield #3; //Field > cri:Ljavax/resource/spi/ConnectionRequestInfo; > 81: invokevirtual #9; //Method > java/lang/Object.equals:(Ljava/lang/Object;)Z > 84: ifeq 91 > 87: iconst_1 > 88: goto 92 > 91: iconst_0 > 92: ireturn > > The result is the following construction > > if(subject.equals(o.subject)){ > cri.equals(o.cri); > } > > > > djencks wrote: >> >> I opened GERONIMO-4639 and fixed this in trunk and branches 2.1 >> >> I couldn't understand the nested iff statements too well so I just >> replaced it with what idea generates for equals :-) >> >> This is a component, not part of geronimo itself. We'll need to push >> a release of at least the 2.1 branch. >> >> thanks >> david jencks >> > > > > -- > View this message in context: http://www.nabble.com/NullPointerException-MultiPoolConnectionInterceptor%24SubjectCRIKey.equals-tp23634940s134p23648828.html > Sent from the Apache Geronimo - Users mailing list archive at > Nabble.com. >