8147553: Remove sun.misc.ManagedLocalsThread from java.management
Reviewed-by: dfuchs
This commit is contained in:
parent
1b0e8a4e73
commit
22da929709
jdk/src/java.management/share/classes
@ -30,7 +30,6 @@ import java.io.InterruptedIOException;
|
||||
|
||||
import com.sun.jmx.remote.util.ClassLogger;
|
||||
import com.sun.jmx.remote.util.EnvHelp;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
|
||||
public abstract class ClientCommunicatorAdmin {
|
||||
private static volatile long threadNo = 1;
|
||||
@ -41,10 +40,11 @@ public abstract class ClientCommunicatorAdmin {
|
||||
if (period > 0) {
|
||||
checker = new Checker();
|
||||
|
||||
Thread t = new ManagedLocalsThread(
|
||||
checker,
|
||||
"JMX client heartbeat " + (++threadNo)
|
||||
);
|
||||
Thread t = new Thread(null,
|
||||
checker,
|
||||
"JMX client heartbeat " + (++threadNo),
|
||||
0,
|
||||
false);
|
||||
|
||||
t.setDaemon(true);
|
||||
t.start();
|
||||
|
@ -52,7 +52,6 @@ import javax.management.remote.TargetedNotification;
|
||||
import com.sun.jmx.remote.util.ClassLogger;
|
||||
import com.sun.jmx.remote.util.EnvHelp;
|
||||
import java.rmi.UnmarshalException;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
|
||||
|
||||
public abstract class ClientNotifForwarder {
|
||||
@ -91,7 +90,8 @@ public abstract class ClientNotifForwarder {
|
||||
throw new IllegalArgumentException("More than one command");
|
||||
this.command = command;
|
||||
if (thread == null) {
|
||||
thread = new ManagedLocalsThread(
|
||||
thread = new Thread(
|
||||
null,
|
||||
()-> {
|
||||
while (true) {
|
||||
Runnable r;
|
||||
@ -107,7 +107,9 @@ public abstract class ClientNotifForwarder {
|
||||
r.run();
|
||||
}
|
||||
},
|
||||
"ClientNotifForwarder-" + ++threadId
|
||||
"ClientNotifForwarder-" + ++threadId,
|
||||
0,
|
||||
false
|
||||
);
|
||||
thread.setDaemon(true);
|
||||
thread.start();
|
||||
|
@ -27,7 +27,6 @@ package com.sun.jmx.remote.internal;
|
||||
|
||||
|
||||
import com.sun.jmx.remote.util.ClassLogger;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
|
||||
public abstract class ServerCommunicatorAdmin {
|
||||
public ServerCommunicatorAdmin(long timeout) {
|
||||
@ -42,7 +41,11 @@ public abstract class ServerCommunicatorAdmin {
|
||||
timestamp = 0;
|
||||
if (timeout < Long.MAX_VALUE) {
|
||||
Runnable timeoutTask = new Timeout();
|
||||
final Thread t = new ManagedLocalsThread(timeoutTask);
|
||||
final Thread t = new Thread(null,
|
||||
timeoutTask,
|
||||
"JMX-Server-Admin-Timeout",
|
||||
0,
|
||||
false);
|
||||
t.setName("JMX server connection timeout " + t.getId());
|
||||
// If you change this name you will need to change a unit test
|
||||
// (NoServerTimeoutTest)
|
||||
|
@ -61,7 +61,6 @@ import javax.management.NotificationBroadcasterSupport;
|
||||
import javax.management.ObjectName;
|
||||
import javax.management.ReflectionException;
|
||||
import static javax.management.monitor.MonitorNotification.*;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
|
||||
/**
|
||||
* Defines the part common to all monitor MBeans.
|
||||
@ -1637,10 +1636,12 @@ public abstract class Monitor
|
||||
}
|
||||
|
||||
public Thread newThread(Runnable r) {
|
||||
Thread t = new ManagedLocalsThread(
|
||||
Thread t = new Thread(
|
||||
group,
|
||||
r,
|
||||
namePrefix + threadNumber.getAndIncrement() + nameSuffix
|
||||
namePrefix + threadNumber.getAndIncrement() + nameSuffix,
|
||||
0,
|
||||
false
|
||||
);
|
||||
|
||||
t.setDaemon(true);
|
||||
|
@ -27,8 +27,6 @@ module java.management {
|
||||
requires public java.rmi;
|
||||
requires java.logging;
|
||||
requires java.naming;
|
||||
// 8147553
|
||||
requires jdk.unsupported;
|
||||
|
||||
exports java.lang.management;
|
||||
exports javax.management;
|
||||
|
@ -34,7 +34,6 @@ import java.lang.management.RuntimeMXBean;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import sun.management.VMManagement;
|
||||
import sun.misc.ManagedLocalsThread;
|
||||
|
||||
/**
|
||||
* JdpController is responsible to create and manage a broadcast loop.
|
||||
@ -219,7 +218,7 @@ public final class JdpController {
|
||||
|
||||
controller = new JDPControllerRunner(bcast, packet, pause);
|
||||
|
||||
Thread t = new ManagedLocalsThread(controller, "JDP broadcaster");
|
||||
Thread t = new Thread(null, controller, "JDP broadcaster", 0, false);
|
||||
t.setDaemon(true);
|
||||
t.start();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user