# HG changeset patch # User bpb # Date 1453491737 28800 # Fri Jan 22 11:42:17 2016 -0800 # Node ID 358cb3db3e1c297aa639c50d94fb0c345a697b3f # Parent 452162be5da9164752bfe0df377738665d8de934 8147545: Remove sun.misc.ManagedLocalsThread from java.prefs Summary: Replace ManagedLocalsThread with Thread(null,null,threadName,0,false) Reviewed-by: XXX diff --git a/src/java.prefs/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java b/src/java.prefs/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java --- a/src/java.prefs/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java +++ b/src/java.prefs/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,6 @@ import java.util.Timer; import java.util.TimerTask; import java.lang.ref.WeakReference; -import sun.misc.ManagedLocalsThread; /* @@ -344,7 +343,8 @@ { if (timer == null) { timer = new Timer(true); // daemon - Thread flushThread = new ManagedLocalsThread() { + Thread flushThread = + new Thread(null, null, "Flush Thread", 0, false) { @Override public void run() { flushWorld(); diff --git a/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java b/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java --- a/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java +++ b/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,6 @@ import java.io.*; import java.security.AccessController; import java.security.PrivilegedAction; -import sun.misc.ManagedLocalsThread; // These imports needed only as a workaround for a JavaDoc bug import java.lang.Integer; import java.lang.Long; @@ -1515,7 +1514,11 @@ * A single background thread ("the event notification thread") monitors * the event queue and delivers events that are placed on the queue. */ - private static class EventDispatchThread extends ManagedLocalsThread { + private static class EventDispatchThread extends Thread { + private EventDispatchThread() { + super(null, null, "Event Dispatch Thread", 0, false); + } + public void run() { while(true) { // Wait on eventQueue till an event is present diff --git a/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java b/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java --- a/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java +++ b/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,6 @@ import java.security.PrivilegedAction; import java.security.PrivilegedExceptionAction; import java.security.PrivilegedActionException; -import sun.misc.ManagedLocalsThread; import sun.util.logging.PlatformLogger; /** @@ -443,7 +442,8 @@ // Add shutdown hook to flush cached prefs on normal termination AccessController.doPrivileged(new PrivilegedAction() { public Void run() { - Runtime.getRuntime().addShutdownHook(new ManagedLocalsThread() { + Runtime.getRuntime().addShutdownHook( + new Thread(null, null, "Sync Timer Thread", 0, false) { public void run() { syncTimer.cancel(); syncWorld();