Hi everyone, As we work our way towards a "clean" (as in no illegal-access warnings) build, Daniel and I have been following the convention of using GroovyAssert.isAtLeastJdk('9.0') for tests which might do illegal access on older JDKs and we don't want to test on the newer JDKs. An example would be tests which save out the AST as XML using XStream. XStream currently doesn't have a version for JDK9+ which is "warning free". To get coverage for tests such as this we rely on the different JDKs being used across our CI servers.
In other cases, where there was no real need to do the illegal access we are just removing it, replacing it with something that does the same thing without the illegal access and without changing the semantics of the test. When removing illegal access cases, we are keeping a representative sample of the cases in IllegalAccessScenariosTest. It doesn't run for JDK9+ normally but can be made to run with a gradle property. If you have tests which we'd also want to check manually in that fashion, I'd recommend following that same convention. At some point, this will need to be refined further to also cater for any breaking changes that we might need to take into account but the first step is just in getting everything warning free unless the user writes code that is going to require an illegal access, e.g. they call a private method or access a private field, and then they'll still get the warning in those cases. Cheers, Paul.