提交 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 {
}
public void run() {
AccessController.doPrivileged((PrivilegedAction<Void>)() -> {
Thread t = Thread.currentThread();
String name = t.getName();
try {
t.setName("RMI TCP Connection(" +
connectionCount.incrementAndGet() +
")-" + remoteHost);
run0();
} finally {
t.setName(name);
}
Thread t = Thread.currentThread();
String name = t.getName();
try {
t.setName("RMI TCP Connection(" +
connectionCount.incrementAndGet() +
")-" + remoteHost);
AccessController.doPrivileged((PrivilegedAction<Void>)() -> {
run0();
return null;
}, NOPERMS_ACC);
} finally {
t.setName(name);
}
}
private void run0() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册