feedback on --permit-illegal-access
Alan Bateman
Alan.Bateman at oracle.com
Fri Apr 7 07:11:11 UTC 2017
On 07/04/2017 00:09, Jochen Theodorou wrote:
> Hi,
>
> so today I found finally _JAVA_OPTIONS to get our gradle build running
> and of course I used --permit-illegal-access and I thought I give some
> feedback here.
>
> Running a clean test on our build will result in 44531 warning
> messages. Of which 6394 are unique. of course some of those warnings
> are actually from gradle and some are from xstream, but that makes
> maybe 21 less.
>
> Why do we have such a huge amount of warnings? That is because of the
> way we are building our meta classes, which we still have to change
> and use JDK9 special code (something we tried to avoid)
The implementation makes a best effort to avoid emitting duplicate
warnings. Are these 44531 warnings coming from one run of the VM or is
this the total from many `java` commands run in the build? Another
possibility is code generation. The filtering of duplicates is based on
the perpetrator's call stack and the victim. If Groovy is generating a
lot of classes and the code is say using a shared utility class to hack
in then these usages would not be unique.
Running with -Dsun.reflect.debugModuleAccessChecks=access will give you
a full stack trace at each warning and should help debug this.
-Alan
More information about the jigsaw-dev
mailing list