Bugs item #574984, was opened at 2002-06-28 17:34
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=574984&group_id=22866

Category: JBossServer
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Stephen Coy (scoy)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bug in proxy.ejb.EntityInterceptor?

Initial Comment:
I think this snippet from EntityInterceptor.invoke() has a problem:

      else if (m.equals(EQUALS))
      {
         Object[] args = invocation.getArguments();
         String argsString = args[0].toString();
         String thisString = toString(ctx);
         return new Boolean(thisString.equals(argsString));
      }
      else if (m.equals(HASH_CODE))

in that it is legitimate for args[0] to be null, so the "toString" call can fail with 
a npe.

This was exposed in the current Branch_3_0 build when passing an EJB proxy to Jetty's 
implementation of HttpSession.setAttribute.

Changing the argsString assignment to:

String argsString = args[0] != null ? args[0].toString() : "";

seems to work better.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=574984&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Caffeinated soap. No kidding.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to