Your code should work with the jdk-9 build https://jdk9.java.net/download/ because this version doesn't integrate the change that enable 'stronger' encapsulation.
Rémi ----- Mail original ----- > De: "Jochen Theodorou" <[email protected]> > À: [email protected] > Envoyé: Dimanche 18 Septembre 2016 19:09:13 > Objet: Re: TeamCity back on track > On 18.09.2016 15:03, Remi Forax wrote: > [...] >> This one is a new bug/feature, >> it's part of what we have called 'stronger' (not strong) encapsulation >> i.e. most of the classes of java.* disallow setAccessible, before that >> only internal packages were disallowing setAccessible. >> >> For your specific bug, you can use ClassLoader.getDefinedPackages() or >> classloader.getUnamedModule().getPackages() instead. > > too bad, we just got the build before that successfully run our build > and I fear that we will now have new problems. The code that uses > setAccessible in Groovy is now pretty flexible when it comes > setAccessible, but still... well right now we have to see for a new > gradle fix > > bye Jochen
