CheckClassAdapter:verify should allow for a custom classloader
We need to run verify in a custom classloader but deep inside the code
(SimpleVerifier) there is a call to Class.forName() which uses the classloader
from the calling class. So we would need to load asm in our custom
classloader, which is not what we want to do because it pollutes our
classloader.
We tried to copy the code from verify, but there are some package protected
variables we can't access. So that is a no go.
So two possible solutions. Fix the verify code so that it can be copied out
and not access any package / private stuff. Or add another verify method
which takes a custom classloader.
Also, might also add this functionality to the SimpleVerifier. Allow it to be
created with a custom class loader.