You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "will mason (JIRA)" <ji...@apache.org> on 2018/03/22 23:17:00 UTC
[jira] [Commented] (GROOVY-8339) Fix warning "An illegal reflective
access operation has occurred"
[ https://issues.apache.org/jira/browse/GROOVY-8339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16410547#comment-16410547 ]
will mason commented on GROOVY-8339:
------------------------------------
This error occurs with java *10* (*18.03*) on Groovy 2.4.12 and *2.4.14* which seems to be the current Release/Production version. JDK 9 is done now.
This problem appears to have effects. Plugins and tests that depend on Groovy can find they don't like the problem.
```
D:> groovy -version
Groovy Version: 2.4.14 JVM: 1.8.0_162 Vendor: Oracle Corporation OS: Windows 10
D:> SET JAVA_HOME=b:\lang\java\jre\v10.00\x64
D:> groovy -version
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/b:/lang/groovy/v02.04/lib/groovy-2.4.14.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Groovy Version: 2.4.14 JVM: 10 Vendor: "Oracle Corporation" OS: Windows 10
```
> Fix warning "An illegal reflective access operation has occurred"
> -----------------------------------------------------------------
>
> Key: GROOVY-8339
> URL: https://issues.apache.org/jira/browse/GROOVY-8339
> Project: Groovy
> Issue Type: Improvement
> Components: groovy-jdk
> Affects Versions: 2.4.11
> Environment: >gradle --version
> Gradle 4.2
> Build time: 2017-09-20 14:48:23 UTC
> Revision: 5ba503cc17748671c83ce35d7da1cffd6e24dfbd
> Groovy: 2.4.11
> Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
> JVM: 9 (Oracle Corporation 9+181)
> OS: Windows 10 10.0 amd64
> Reporter: Benjamin Roedell
> Priority: Minor
> Labels: newbie, security
>
> I'm running JDK-9 on Windows 10 with Gradle 4.2.
> My global gradle.properties file contains the following line:
> org.gradle.java.home=C:/Program Files/Java/jdk-9
> When I request the gradle version (gradle --version) I get the following warning:
> {code:none}
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/Program%20Files/gradle-4.2/lib/groovy-all-2.4.11.jar) to method java.lang.Object.finalize()
> WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
> WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> {code}
> This warning displayed regardless of whether I'm using a regular command prompt or an elevated rights (Administrator) command prompt.
> Here's the full command and output:
> {code:none}
> gradle --version
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/Program%20Files/gradle-4.2/lib/groovy-all-2.4.11.jar) to method java.lang.Object.finalize()
> WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
> WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> ------------------------------------------------------------
> Gradle 4.2
> ------------------------------------------------------------
> Build time: 2017-09-20 14:48:23 UTC
> Revision: 5ba503cc17748671c83ce35d7da1cffd6e24dfbd
> Groovy: 2.4.11
> Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
> JVM: 9 (Oracle Corporation 9+181)
> OS: Windows 10 10.0 amd64
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)