geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert_nor <c...@mail.ru>
Subject Re: NullPointerException MultiPoolConnectionInterceptor$SubjectCRIKey.equals
Date Thu, 21 May 2009 07:08:04 GMT

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.


Mime
View raw message