This AnnotationProxy::doEquals looks like it misses a lot of logic. ;-)
| private Object doEquals(Object proxy, Object obj)
| {
| if (obj == proxy)
| return Boolean.TRUE;
| if (obj == null)
| return Boolean.FALSE;
|
| Class[] intfs = proxy.getClass().getInterfaces();
| if (intfs[0].isAssignableFrom(obj.getClass()) == false)
| {
| return Boolean.FALSE;
| }
| try
| {
| Proxy.getInvocationHandler(obj);
| }
| catch (Exception ex)
| {
| return Boolean.FALSE;
| }
| return Boolean.TRUE;
| }
|
And that last attempt is wrong,
e.g. this is totally legit, but would also fail:
| String expr = "(a)"+Name.class.getName() +
"(type=\"type\",subtype=\"subtype\")";
| Name n0 = (Name) AnnotationCreator.createAnnotation(expr, Name.class);
| Name n2 = new NameImpl("type", "subtype");
| assertEquals(n0, n2); // FAILURE -- n2 has no InvocationHandler
|
I'll fix the impl, but what to do with release, since we already did 2.0.0.GA?
2.0.1.GA?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185962#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...