You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Graeme Rocher (JIRA)" <ji...@apache.org> on 2016/04/26 11:59:12 UTC
[jira] [Created] (GROOVY-7828) Created a class loader that override
loadClass can calls protected methods results in VerifyError
Graeme Rocher created GROOVY-7828:
-------------------------------------
Summary: Created a class loader that override loadClass can calls protected methods results in VerifyError
Key: GROOVY-7828
URL: https://issues.apache.org/jira/browse/GROOVY-7828
Project: Groovy
Issue Type: Bug
Affects Versions: 2.4.6
Reporter: Graeme Rocher
The following script results in a VerifyError. It should fail with a compilation error since the `loadClass` method is protected.
{code}
import groovy.transform.*
@CompileStatic
class FooClassLoader extends URLClassLoader {
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
try {
return super.loadClass(name, resolve)
} catch (ClassNotFoundException cnfe) {
return ClassLoader.systemClassLoader.loadClass(name, resolve)
}
}
}
def cl = new FooClassLoader()
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)