# HG changeset patch # User bpb # Date 1453495472 28800 # Node ID 613162418a3d19e5e536d9b435a111824b8a02bb # Parent 24e6bd6c0b7585d8789426c4427717097ba7d902 8147545: Remove sun.misc.ManagedLocalsThread from java.prefs Summary: Replace ManagedLocalsThread with Thread(null,null,threadName,0,false) Reviewed-by: chegar diff -r 24e6bd6c0b75 -r 613162418a3d jdk/src/java.prefs/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java --- a/jdk/src/java.prefs/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java Fri Jan 22 17:43:21 2016 +0000 +++ b/jdk/src/java.prefs/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java Fri Jan 22 12:44:32 2016 -0800 @@ -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 -r 24e6bd6c0b75 -r 613162418a3d jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java --- a/jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java Fri Jan 22 17:43:21 2016 +0000 +++ b/jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java Fri Jan 22 12:44:32 2016 -0800 @@ -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 -r 24e6bd6c0b75 -r 613162418a3d jdk/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java --- a/jdk/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java Fri Jan 22 17:43:21 2016 +0000 +++ b/jdk/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java Fri Jan 22 12:44:32 2016 -0800 @@ -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();