Using non-parallel custom class loaders for Layer configurations
Mandy Chung
mandy.chung at oracle.com
Thu Sep 8 23:48:12 UTC 2016
> On Sep 8, 2016, at 3:29 PM, David M. Lloyd <david.lloyd at redhat.com> wrote:
>
> Would it be possible to include a method like this (pretty old patch I had laying around):
>
> diff --git a/jdk/src/java.base/share/classes/java/lang/ClassLoader.java b/jdk/src/java.base/share/classes/java/lang/ClassLoader.java
> index 1bb1580..3def10e 100644
> --- a/jdk/src/java.base/share/classes/java/lang/ClassLoader.java
> +++ b/jdk/src/java.base/share/classes/java/lang/ClassLoader.java
> @@ -469,6 +477,15 @@ public abstract class ClassLoader {
> return lock;
> }
>
> + /**
> + * Determine whether this class loader is parallel-capable.
> + *
> + * @return {@code true} if the class loader is parallel-capable, {@code false} otherwise
> + */
> + protected final boolean isParallelCapable() {
> + return ParallelLoaders.isRegistered(getClass());
> + }
> +
This seems a fine method to add. I think it can be a public method (I don’t see any reason it has to be protected)
Mandy
More information about the jigsaw-dev
mailing list