RFR [9] 8153158: Remove sun.misc.ManagedLocalsThread from java.logging
Daniel Fuchs
daniel.fuchs at oracle.com
Mon Apr 18 13:23:26 UTC 2016
On 18/04/16 08:01, Chris Hegarty wrote:
> 8056152 added a new constructor to java.lang.Thread to constructing Threads that
> do not inherit inheritable-thread-local initial values. Given there is now a supported
> API for creating such threads, other areas of the JDK should be updated to use it.
>
> This change updates the code in java.logging to use the new Thread constructor.
Hi Chris,
Looks good to me.
best regards
-- daniel
>
> --- a/src/java.logging/share/classes/java/util/logging/LogManager.java
> +++ b/src/java.logging/share/classes/java/util/logging/LogManager.java
> @@ -42,7 +42,6 @@
> import java.util.stream.Stream;
> import jdk.internal.misc.JavaAWTAccess;
> import jdk.internal.misc.SharedSecrets;
> -import sun.misc.ManagedLocalsThread;
> import sun.util.logging.internal.LoggingProviderImpl;
>
> /**
> @@ -254,9 +253,10 @@
>
> // This private class is used as a shutdown hook.
> // It does a "reset" to close all open handlers.
> - private class Cleaner extends ManagedLocalsThread {
> + private class Cleaner extends Thread {
>
> private Cleaner() {
> + super(null, null, "Logging-Cleaner", 0, false);
> /* Set context class loader to null in order to avoid
> * keeping a strong reference to an application classloader.
> */
> diff --git a/src/java.logging/share/classes/module-info.java b/src/java.logging/share/classes/module-info.java
> --- a/src/java.logging/share/classes/module-info.java
> +++ b/src/java.logging/share/classes/module-info.java
> @@ -24,8 +24,6 @@
> */
>
> module java.logging {
> - // 8153158
> - requires jdk.unsupported;
> exports java.util.logging;
> provides jdk.internal.logger.DefaultLoggerFinder with
> sun.util.logging.internal.LoggingProviderImpl;
>
> -Chris.
>
More information about the core-libs-dev
mailing list