提交 1d92eadf 编写于 作者: S smarks

8062807: Exporting RMI objects fails when run under restrictive SecurityManager

Reviewed-by: dfuchs, skoivu, igerasim, msheppar
上级 6dc5226a
...@@ -673,19 +673,19 @@ public class TCPTransport extends Transport { ...@@ -673,19 +673,19 @@ public class TCPTransport extends Transport {
} }
public void run() { public void run() {
AccessController.doPrivileged((PrivilegedAction<Void>)() -> { Thread t = Thread.currentThread();
Thread t = Thread.currentThread(); String name = t.getName();
String name = t.getName(); try {
try { t.setName("RMI TCP Connection(" +
t.setName("RMI TCP Connection(" + connectionCount.incrementAndGet() +
connectionCount.incrementAndGet() + ")-" + remoteHost);
")-" + remoteHost); AccessController.doPrivileged((PrivilegedAction<Void>)() -> {
run0(); run0();
} finally {
t.setName(name);
}
return null; return null;
}, NOPERMS_ACC); }, NOPERMS_ACC);
} finally {
t.setName(name);
}
} }
private void run0() { private void run0() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册