"alesj" wrote : "alesj" wrote : "adrian(a)jboss.org" wrote :
| | | The simplest fix would be in the component visitor
| | |
| | But you're right, yours looks easier. :-)
| But yours doesn't work, where mine does. :-)
|
| Testing on AnnotatedBeansUnitTestCase.
| Need to check why is that ... since both look legit.
Neither of them work. See my comment about needing the className -> class HACK
If somebody in a deployer does:
| unit.getMetaData().getAnnotation(Blah.class);
|
The AnnotatedElementMetaDataLoader/ClassMetaDataRetrievalFactory
is going to be very confused when it gets a class name instead of a class. :-)
|
| public MetaDataRetrieval getMetaDataRetrieval(Scope scope)
| {
| if (scope == null)
| throw new IllegalArgumentException("Null scope");
| if (CommonLevels.CLASS.equals(scope.getScopeLevel()) == false)
| throw new IllegalArgumentException("Not a class scope: " + scope);
|
| // Not a class
| Object qualifier = scope.getQualifier();
| if (qualifier instanceof Class == false)
| return null; // OOPS!!!!!!!!!!
|
| Class<?> clazz = Class.class.cast(qualifier);
| return new AnnotatedElementMetaDataLoader(clazz);
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185161#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...