On Tue, 2 Dec 2025 15:44:26 GMT, Jaikiran Pai <[email protected]> wrote:

> Can I please get a review of this change which removes the usage of 
> `jdk.internal.misc.ThreadTracker` from the `java.util.jar.JarFile` code? This 
> addresses https://bugs.openjdk.org/browse/JDK-8366101.
> 
> The updated code replaces the usage of `ThreadTracker` with the standard 
> `ScopedValue` API.
> 
> No new tests have been introduced, given the nature of the change. tier 
> testing is currently in progress with this change.

src/java.base/share/classes/java/util/jar/JarFile.java line 1043:

> 1041:             // the JAR verifier
> 1042:             ScopedValue.where(IN_VERIFIER_INIT, true).call(
> 1043:                     new ScopedValue.CallableOp<Void, Exception>() {

ScopedValue.Carrier defines a run method so you could use 
`ScopedValue.where(IN_VERIFIER_INIT, true).run(..)` here and avoid the 
exception handling.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28609#discussion_r2581980625

Reply via email to