It doesn't just suck, it is evil. It caches things it shouldn't.
We were forced into it for java6 array problem. But its only really required
if the classname looks like an array class.
You changed too much for this. e.g. you changed all the classloader
stuff, even though the entry point loadClass() already has the checking.
| if (classNameLooksLikeAnError)
| useClassForName();
| else
| loadClassFromClassLoaderNormally();
|
But you can't rely on our classloader being the entry point all the time,
so a helper class that does this would be ok.
i.e. invoke the helper doing the code above instead of Class.forName() directly.
Another workaround would be to byte code weave all classes using
Class.forName() to our helper using a Transformer on the classloader.
The ironic part is that Java6 on Sun has a rewritten constraint checker that is
much faster. ;-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133925#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...