JDK 9 Early Access with Project Jigsaw, build 135 on 09-14-2016 (#5500)
Alan Bateman
Alan.Bateman at oracle.com
Sun Oct 2 18:33:20 UTC 2016
On 02/10/2016 13:26, Jochen Theodorou wrote:
>
> Project Panama is going to be in JDK9? That is new to me.
I didn't say this. I was just making the point that in the future that
using system calls and native code will be a lot better (simpler, more
reliable, faster, ...).
>
> But yes, I too suggest the gradle people bring that to core-lib-dev
Thanks, that is the right place to discuss this issue.
>
> hmm... if I look at
> https://github.com/gradle/gradle/blob/master/subprojects/base-services/src/main/java/org/gradle/internal/classloader/MultiParentClassLoader.java
> and I imagine one parent being a MultiParentClassLoader...
> getDefinedPackages is final, so you cannot do what they did for
> getPackages, unless you do it from outside. And for that you need to
> know about multiple parents... I don´t know if it is working well
> enough for Gradle, but no, getDefinedPackages is no suitable
> replacement for getPackages at all if you have to consider multiparent
> class loaders.
If MultiParentClassLoader defines a method to get its parents then you
can walk the hierarchy, special case MultiParentClassLoader, and calling
getDefinedPackages on each one. It's not going to help if there are
other custom multi-parent loaders from elsewhere in the hierarchy but I
can't tell if this is possible here.
-Alan
More information about the jigsaw-dev
mailing list