[
https://issues.apache.org/jira/browse/GROOVY-10566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17519877#comment-17519877
]
Paul King edited comment on GROOVY-10566 at 4/9/22 6:11 AM:
------------------------------------------------------------
Changing priority for now. The WARNING is the expected behavior of 2.5.x when
run on JDK9+ and doesn't affect further behavior of the Groovy program which
should run to normal successful completion.
Also, the "gradlew \--version" information doesn't seem to relate to the JDK
being used by Sonar since it talks about "\--illegal-access=warn" which came in
with JDK9.
was (Author: paulk):
Changing priority for now. The WARNING is the expected behavior of 2.5.x when
run on JDK9+ and doesn't affect further behavior of the Groovy program which
should run to normal successful completion.
Also, the "gradlew --version" information doesn't seem to relate to the JDK
being used by Sonar since it talks about "--illegal-access=warn" which came in
with JDK9.
> WARNING: Illegal reflective access by
> org.codehaus.groovy.reflection.CachedClass
> --------------------------------------------------------------------------------
>
> Key: GROOVY-10566
> URL: https://issues.apache.org/jira/browse/GROOVY-10566
> Project: Groovy
> Issue Type: Bug
> Components: groovy-jdk
> Affects Versions: 2.5.12
> Environment: Mac OS X 12.2.1 x86_64
> Reporter: Calvin Taylor
> Priority: Minor
>
> Hi,
> Thanks for your time. I'm trying to integrate sonarqube on a complex, old
> gradle project structure. We have 450 subprojects, and it gets more
> complicated, I'll save that for now, it may not be important, the basic
> structure is.
> {noformat}
> project
> -master
> -subprojecttype
> --subprojectinstance1
> ...
> --subprojectinstance450{noformat}
>
> ./gradlew tasks --debug | grep -A5 sonarqub
>
> {noformat}
> 2022-03-03T09:46:20.487-0400 [ERROR] [system.err] WARNING: An illegal
> reflective access operation has occurred
> 2022-03-03T09:46:20.487-0400 [ERROR] [system.err] WARNING: Illegal reflective
> access by org.codehaus.groovy.reflection.CachedClass
> (file:/Users/[email protected]/.gradle/wrapper/dists/gradle-6.8.1-bin/a3ijn718agivfn4m4c5tfgx2i/gradle-6.8.1/lib/groovy-all-1.3-2.5.12.jar)
> to method
> java.util.AbstractCollection.finishToArray(java.lang.Object[],java.util.Iterator)
> 2022-03-03T09:46:20.487-0400 [ERROR] [system.err] WARNING: Please consider
> reporting this to the maintainers of
> org.codehaus.groovy.reflection.CachedClass
> 2022-03-03T09:46:20.487-0400 [ERROR] [system.err] WARNING: Use
> --illegal-access=warn to enable warnings of further illegal reflective access
> operations
> 2022-03-03T09:46:20.488-0400 [ERROR] [system.err] WARNING: All illegal access
> operations will be denied in a future release
> {noformat}
>
> I think this error is causing sonarqube to die silently, the task never gets
> added to our build.
> Any assistance, comments or suggestions are welcome.
> {noformat}
> $ ./gradlew --version
> ------------------------------------------------------------
> Gradle 6.8.1
> ------------------------------------------------------------
> Build time: 2021-01-22 13:20:08 UTC
> Revision: 31f14a87d93945024ab7a78de84102a3400fa5b2
> Kotlin: 1.4.20
> Groovy: 2.5.12
> Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
> JVM: 1.8.0_322 (Eclipse OpenJ9 openj9-0.30.0)
> OS: Mac OS X 12.2.1 x86_64
> {noformat}
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)