RFR: 8319265: TestLoadLibraryDeadlock.java fails on windows-x64 "Unable to load b.jar"

Jaikiran Pai jpai at openjdk.org
Thu Nov 2 06:41:01 UTC 2023


On Thu, 2 Nov 2023 01:00:38 GMT, Mandy Chung <mchung at openjdk.org> wrote:

> The test fails on windows because unmatched comparison of `Path.toString()` vs `URL.getPath().toString()` after JDK-8317965.   A simple fix is to evaluate the JAR file path in the same way as `LoadLibraryDeadlock` does.

Marked as reviewed by jpai (Reviewer).

test/jdk/java/lang/ClassLoader/loadLibraryDeadlock/TestLoadLibraryDeadlock.java line 185:

> 183: 
> 184:     private static String toLocationString(Path path) {
> 185:         return path.toUri().getPath();

Hello Mandy, this looks OK to me. Because the `LoadLibraryDeadlock.getLocation()` uses `URL.getPath()` to print the message in the logs, maybe for consistency and to rule out any unexpected differences, perhaps use `path.toUri().toURL().getPath()` instead?

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

PR Review: https://git.openjdk.org/jdk/pull/16466#pullrequestreview-1709542898
PR Review Comment: https://git.openjdk.org/jdk/pull/16466#discussion_r1379653401


More information about the core-libs-dev mailing list