Skip to content

Commit

Permalink
Merge pull request #16339 from pshipton/stop
Browse files Browse the repository at this point in the history
Remove mention of ThreadDeath, which is unused and deprecated in jdk20
  • Loading branch information
keithc-ca committed Nov 23, 2022
2 parents 5315bf9 + 35e15d0 commit 9691388
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions jcl/src/java.base/share/classes/java/lang/J9VMInternals.java
Expand Up @@ -338,7 +338,11 @@ private static Throwable copyThrowable(Throwable throwable, HashMap hashMapThrow
}

/**
* Private method to be called by the VM after a Threads dies and throws ThreadDeath
/*[IF JAVA_SPEC_VERSION < 20]
* Private method to be called by the VM after a Threads dies and throws ThreadDeath.
/*[ELSE]
* Private method to be called by the VM after a Threads dies.
/*[ENDIF]
* It has to <code>notifyAll()</code> so that <code>join</code> can work properly.
* However, it has to be done when the Thread is "thought of" as being dead by other
* observer Threads (<code>isAlive()</code> has to return false for the Thread
Expand Down Expand Up @@ -641,7 +645,6 @@ public static String formatNoSuchMethod(String methodSig, Class<?> clazz1, Strin
"{0} (loaded from {1} by {2}) called from {3} (loaded from {4} by {5}).", //$NON-NLS-1$
args);
} catch (Exception | VirtualMachineError e) {
// don't catch ThreadDeath
if ((null == callingClassInfo) || (null == calledClassInfo)) {
return methodSig;
}
Expand All @@ -650,7 +653,6 @@ public static String formatNoSuchMethod(String methodSig, Class<?> clazz1, Strin
return methodSig + "(loaded from " + callingClassInfo[0] + " by " + callingClassInfo[1] + ") called from " + clazz2.toString() +
" (loaded from " + calledClassInfo[0] + " by " + calledClassInfo[1] + ")";
} catch (Exception | VirtualMachineError e2) {
// don't catch ThreadDeath
/* if something fails, fall back to old message */
return methodSig;
}
Expand Down

0 comments on commit 9691388

Please sign in to comment.