You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Tommy Svensson (Jira)" <ji...@apache.org> on 2019/09/28 13:12:00 UTC

[jira] [Created] (GROOVY-9260) JDK 11 prints warning about org.codehaus.groovy.reflection.ReflectionUtils

Tommy Svensson created GROOVY-9260:
--------------------------------------

             Summary: JDK 11 prints warning about org.codehaus.groovy.reflection.ReflectionUtils
                 Key: GROOVY-9260
                 URL: https://issues.apache.org/jira/browse/GROOVY-9260
             Project: Groovy
          Issue Type: Bug
          Components: groovy-runtime
    Affects Versions: 3.0.0-beta-3
         Environment: macOS X 10.14.6
            Reporter: Tommy Svensson


Get the following warning:

WARNING: Illegal reflective access by org.codehaus.groovy.reflection.ReflectionUtils (file:/Volumes/PROMISE_PEGASUS/Development/repository/maven/repository/org/codehaus/groovy/groovy/3.0.0-beta-3/groovy-3.0.0-beta-3.jar) to method java.net.URLClassLoader.findClass(java.lang.String)WARNING: Illegal reflective access by org.codehaus.groovy.reflection.ReflectionUtils (file:/Volumes/PROMISE_PEGASUS/Development/repository/maven/repository/org/codehaus/groovy/groovy/3.0.0-beta-3/groovy-3.0.0-beta-3.jar) to method java.net.URLClassLoader.findClass(java.lang.String) at org.codehaus.groovy.reflection.ReflectionUtils.makeAccessible(ReflectionUtils.java:204) at org.codehaus.groovy.reflection.ReflectionUtils.makeAccessible(ReflectionUtils.java:196) at org.codehaus.groovy.reflection.ReflectionUtils$1.run(ReflectionUtils.java:189) at org.codehaus.groovy.reflection.ReflectionUtils$1.run(ReflectionUtils.java:187) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.codehaus.groovy.reflection.ReflectionUtils.makeAccessibleInPrivilegedAction(ReflectionUtils.java:187) at org.codehaus.groovy.reflection.CachedMethod.makeAccessibleIfNecessary(CachedMethod.java:380) at org.codehaus.groovy.reflection.CachedMethod.setAccessible(CachedMethod.java:155) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.<init>(PojoMetaMethodSite.java:182) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.<init>(PojoMetaMethodSite.java:207) at org.codehaus.groovy.reflection.CachedMethod.createPojoMetaMethodSite(CachedMethod.java:313) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.createCachedMethodSite(PojoMetaMethodSite.java:159) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.createPojoMetaMethodSite(PojoMetaMethodSite.java:148) at groovy.lang.MetaClassImpl.createPojoCallSite(MetaClassImpl.java:3525) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java:131) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:165) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127) at [Edit: code line doing: classloader.findClass(name) ] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:123) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1048) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:37) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115) at org.codehaus.groovy.runtime.callsite.BooleanReturningMethodInvoker.invoke(BooleanReturningMethodInvoker.java:49) at org.codehaus.groovy.runtime.callsite.BooleanClosureWrapper.call(BooleanClosureWrapper.java:52) at org.codehaus.groovy.runtime.DefaultGroovyMethods.find(DefaultGroovyMethods.java:4348) at org.codehaus.groovy.runtime.dgm$233.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:244)

Note that I did an edit in the stack trace above, replacing the reference to the line in my class which you cannot see, to the code executing on that line which is a call to ClassLoader.findClass(name). Probably not relevant, but just in case.

As usual in Jira things are extreme or the total opposite, but never ever somewhere in between, so setting priority is hard. I left it at Major since as I understand it, this is something that will fail rather than warn in JDK 12.

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)