Bugs item #487846, was opened at 2001-12-01 08:17
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=487846&group_id=22866
Category: JBossServer
Group: v2.5 Rabbit Hole (unstable)
Status: Open
>Resolution: Fixed
Priority: 5
Submitted By: Peter Levart (plevart)
Assigned to: Nobody/Anonymous (nobody)
Summary: org.jboss.proxy.Proxies.Impl.sameTypes()
Initial Comment:
The org.jboss.proxy.Proxies.Impl.sameTypes() has two
bugs. The first is harmless as it will never be
executed but the second causes the method to return
the oposite boolean value as it should. The
consequence is that proxy generation producess new
instancess of Class anc ClassLoader objects for every
instance of the proxy that implements the same
interfaces. More dangerous is the fact that some day
the proxy generator could return a proxy instance
that actualy didn't implement the requested
interfaces.
I reported this on the jboss-developement but heard
no answers yet. I'm submiting this as a bug so that
it won't be forgotten.
Peter
Here is the diff:
Index: Proxies.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/proxy/Proxies.java,v
retrieving revision 1.7
diff -c -r1.7 Proxies.java
*** Proxies.java 2001/11/26 03:19:46 1.7
--- Proxies.java 2001/12/01 16:05:13
***************
*** 300,306 ****
// (duplication and reordering are ignored)
static boolean sameTypes(Class tt1[], Class
tt2[])
{
! if (tt1.length == 1 && tt2.length == 0)
{
return tt1[0] == tt2[0];
}
--- 300,306 ----
// (duplication and reordering are ignored)
static boolean sameTypes(Class tt1[], Class
tt2[])
{
! if (tt1.length == 1 && tt2.length == 1)
{
return tt1[0] == tt2[0];
}
***************
*** 335,341 ****
totalSeen2 += seen2;
}
// now, each element of tt2 must have
been visited
! return totalSeen2 != tt2.length;
}
static Class[] copyAndUniquify(Class
targetTypes[])
--- 335,341 ----
totalSeen2 += seen2;
}
// now, each element of tt2 must have
been visited
! return totalSeen2 == tt2.length;
}
static Class[] copyAndUniquify(Class
targetTypes[])
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=487846&group_id=22866
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development