Patches item #489841, was opened at 2001-12-06 05:28
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=489841&group_id=22866
Category: JBossServer
Group: v2.5 Rabbit Hole (unstable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Goedhart (andrewgoedhart)
Assigned to: Nobody/Anonymous (nobody)
Summary: Equals(null) causes exception in 3.0
Initial Comment:
This Bug affects 3.0 alpha
it has been fixed in the pending 2.4.4 release however
it has not been applied to the 1.3+ branch(v3.0 alpha)
of the source file BeanProxy.
The problem is that a beans remote proxy when doing
Remote.equals(null) throws a null pointer exception.
It should rather return false as null is a valid value
for equals
The problem is in the implementation of
org.jboss.plugins.jrmp.interfaces.EntityProxy which
under invoke redefines .equals() as a call to
isIdentical() :
if (m.equals(GenericProxy.EQUALS))
return invoke(proxy, BeanProxy.IS_IDENTICAL, args);
and then defines .isIdentical() as:
if (m.equals(BeanProxy.IS_IDENTICAL))
return isIdentical(args[0], cacheKey.getId());
To fix the bug we need to change
org.jboss.plugins.jrmp.interfaces.BeanProxy.isIdentical
() to the following by inserting a guard condition for
null :
protected Boolean isIdentical(Object a, Object b)
throws RemoteException {
if( a == null) return a==b;
EJBObject ejb = (EJBObject) a;
Object pk = ejb.getPrimaryKey();
return new Boolean(pk.equals(b));
}
This problem is a real problem with the new
implementation of jetty in V3.0 because when inserting
stuff into the session, jetty checks to see if the
object is the same as the previous one by using
the .equals() command and for the first time the
previous one is null so you cannot insert an EJB
remote interface into the sesson.
Could someone please update Jboss 3.0 alpha CVS with
this.
Andrew Goedhart
(A developer using JBOSS in sunny South Africa)
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=489841&group_id=22866
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development