I'd rather do
| ClassLoader loader;
| if (cl != null)
| {
| loader = cl;
| }
| else if (annotation != null)
| {
| loader = annotation.getClassLoader();
| }
| if (loader == null)
| {
| loader = Thread.currentThread().getContextClassLoader();
| }
|
Since if the annotation class is loaded by the bootstrap classloader,
annotation.getClassLoader() might be null.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180574#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...