This content has been marked as final.
Show 4 replies
-
1. Re: AnnotatedElementMetaDataLoader and bridge methods
wolfc Apr 20, 2010 8:24 AM (in response to wolfc) -
2. Re: AnnotatedElementMetaDataLoader and bridge methods
kabirkhan Apr 20, 2010 10:43 AM (in response to wolfc)I've made AnnotatedElementMetaDataLoader attempt to find a matching method. If it cannot be found, a null element loader is returned (or maybe I should throw an exception instead?)
Just so I remember in case I need to come back to it, this simple test
public class BridgeMethodTest { static class BaseGenerics<T> { T getThing(T t) { return t; } } static class ChildGenerics extends BaseGenerics<String> { String getThing(String s) { return s; } } public static void main(String[] args) { for (Method m : ChildGenerics.class.getDeclaredMethods()) System.out.println(m + " - " + m.isBridge()); } }
gives
java.lang.String org.jboss.test.benchmark.BridgeMethodTest$ChildGenerics.getThing(java.lang.String) - false java.lang.Object org.jboss.test.benchmark.BridgeMethodTest$ChildGenerics.getThing(java.lang.Object) - true
-
Bridge_Method_test.patch.zip 2.4 KB
-
-
3. Re: AnnotatedElementMetaDataLoader and bridge methods
wolfc Apr 22, 2010 3:31 AM (in response to kabirkhan)The only reason I can think of for throwing an exception would be speed. It's considerably slower when a bridge method is passed in.
Then again the problem would move to the proxy, so I don't see a way to gain.
-
4. Re: AnnotatedElementMetaDataLoader and bridge methods
wolfc Apr 22, 2010 4:18 AM (in response to wolfc)https://jira.jboss.org/jira/browse/JBMDR-69
I've added tests and fixes for DeclaredMethodSignature and attached the patches.