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)