Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-9217

Fix warning "An illegal reflective access operation has occurred" when setting property

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-rc-1
    • None
    • None

    Description

      Input the following content in the groovySh (found by glaforge)

      :doc collect
      

      Yields the following warnings:

      WARNING: Illegal reflective access by org.codehaus.groovy.reflection.ReflectionUtils (file:/D:/_DEV/groovy-3.0.0-beta-3/lib/groovy-3.0.0-beta-3.jar) to method sun.net.www.protocol.http.HttpURLConnection.setRequestMethod(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.invoke(CachedMethod.java:115)
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
              at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2843)
              at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3898)
              at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:219)
              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:496)
              at org.apache.groovy.groovysh.commands.DocCommand.sendHEADRequest(DocCommand.groovy:177)
              at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:190)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:58)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:168)
              at org.apache.groovy.groovysh.commands.DocCommand.urlsFor(DocCommand.groovy:152)
              at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:190)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:58)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:168)
              at org.apache.groovy.groovysh.commands.DocCommand.doc(DocCommand.groovy:83)
              at org.apache.groovy.groovysh.commands.DocCommand$doc.callCurrent(Unknown Source)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:168)
      WARNING: Illegal reflective access by org.codehaus.groovy.reflection.ReflectionUtils (file:/D:/_DEV/groovy-3.0.0-beta-3/lib/groovy-3.0.0-beta-3.jar) to method sun.net.www.protocol.http.HttpURLConnection.setConnectTimeout(int)
              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.invoke(CachedMethod.java:115)
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
              at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2843)
              at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3898)
              at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:219)
              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:496)
              at org.apache.groovy.groovysh.commands.DocCommand.sendHEADRequest(DocCommand.groovy:178)
              at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:190)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:58)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:168)
              at org.apache.groovy.groovysh.commands.DocCommand.urlsFor(DocCommand.groovy:152)
              at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:190)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:58)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:168)
              at org.apache.groovy.groovysh.commands.DocCommand.doc(DocCommand.groovy:83)
              at org.apache.groovy.groovysh.commands.DocCommand$doc.callCurrent(Unknown Source)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:168)
      WARNING: Illegal reflective access by org.codehaus.groovy.reflection.ReflectionUtils (file:/D:/_DEV/groovy-3.0.0-beta-3/lib/groovy-3.0.0-beta-3.jar) to method sun.net.www.protocol.http.HttpURLConnection.setReadTimeout(int)
              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.invoke(CachedMethod.java:115)
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
              at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2843)
              at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3898)
              at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:219)
              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:496)
              at org.apache.groovy.groovysh.commands.DocCommand.sendHEADRequest(DocCommand.groovy:179)
              at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:190)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:58)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:168)
              at org.apache.groovy.groovysh.commands.DocCommand.urlsFor(DocCommand.groovy:152)
              at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:190)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:58)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:168)
              at org.apache.groovy.groovysh.commands.DocCommand.doc(DocCommand.groovy:83)
              at org.apache.groovy.groovysh.commands.DocCommand$doc.callCurrent(Unknown Source)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:168)
      Documentation for "collect" could not be found.
      groovy:000> PogoCachedMethodSiteNoUnwrapNoCoerce
      
      

      Attachments

        Issue Links

          Activity

            People

              daniel_sun Daniel Sun
              daniel_sun Daniel Sun
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m