Hi there,
your fix looks fine, thank you! If you want to contribute would you mind adding some tests
to test this case to the ReflectionTester? Once that is done, I can add your fix to the
aop source tree. Otherwise it will take a bit longer since I then need to write the tests
:-) I think what you have done will also affect private constructors being called by
reflection, since they also get a wrapper method, so if you really want to help it would
be great if you could look at that too. Funnily enough the ReflectionAspect was the first
thing I worked on when I started contributing to JBoss AOP :-)
To check out aop source
svn co
http://anonsvn.jboss.org/repos/jbossas/projects/aop/trunk/ jboss-aop
The reflection test lives under jboss-aop/aop/src/main/org/jboss/aop/reflection/
And it is configured under
jboss-aop/aop/src/resources/test/reflection/jboss-aop.xml
Let me know if you need more info about how to build/run the tests?
BTW things like
m.setAccessible(true);
will not work if run under a security manager, and the aop tests are being run with a
security manager enabled.
Take a look at the ReflectionAspect.SecurityAction class, which currently wraps calls to
Class.getDeclaredFields() etc. when called with and without a security manager.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048673#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...