1 Star 0 Fork 82

MYX/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
8048210-8056152.patch 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
From d47f002ce4b016b077b99fa5430b6ca448988b13 Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 16:24:23 +0800
Subject: 8048210 8056152: fix assert fail for an InnocuousThread
Summary: <java.lang>: fix assert fail for an InnocuousThread
LLT: jdk8u/jdk/test/java/rmi/transport/pinLastArguments/PinLastArguments.java
Bug url: https://bugs.openjdk.java.net/browse/JDK-8048210 https://bugs.openjdk.java.net/browse/JDK-8056152
---
jdk/src/share/classes/sun/misc/InnocuousThread.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/jdk/src/share/classes/sun/misc/InnocuousThread.java b/jdk/src/share/classes/sun/misc/InnocuousThread.java
index 3acd9424c..e585a9c0b 100644
--- a/jdk/src/share/classes/sun/misc/InnocuousThread.java
+++ b/jdk/src/share/classes/sun/misc/InnocuousThread.java
@@ -70,6 +70,7 @@ public final class InnocuousThread extends Thread {
public InnocuousThread(Runnable target) {
super(INNOCUOUSTHREADGROUP, target, newName());
UNSAFE.putOrderedObject(this, INHERITEDACCESSCONTROLCONTEXT, ACC);
+ UNSAFE.putOrderedObject(this, CONTEXTCLASSLOADER, ClassLoader.getSystemClassLoader());
eraseThreadLocals();
}
@@ -80,12 +81,6 @@ public final class InnocuousThread extends Thread {
eraseThreadLocals();
}
- @Override
- public ClassLoader getContextClassLoader() {
- // always report system class loader
- return ClassLoader.getSystemClassLoader();
- }
-
@Override
public void setUncaughtExceptionHandler(UncaughtExceptionHandler x) {
// silently fail
--
2.19.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/myx_076/openjdk-1.8.0.git
git@gitee.com:myx_076/openjdk-1.8.0.git
myx_076
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助