RFR: 8350964: Add an ArtifactResolver.fetch(clazz) method

Mikhail Yankelevich myankelevich at openjdk.org
Tue Mar 11 15:42:55 UTC 2025


On Tue, 11 Mar 2025 15:21:09 GMT, Matthew Donovan <mdonovan at openjdk.org> wrote:

> In this PR, I created a new method, `ArtifactResolver.fetchOne()`, to consolidate duplicate code across tests.

test/jdk/sun/security/provider/acvp/Launcher.java line 181:

> 179:     }
> 180: 
> 181:     private static Path fetchACVPServerTests(Class<?> clazz) {

Is there a point in this method? It's used in 1 spot only it seems and you can just directly call `fetchOne`

test/lib/jdk/test/lib/artifacts/ArtifactResolver.java line 100:

> 98:             Throwable cause = e.getCause();
> 99:             if (cause == null) {
> 100:                 // if property doesn't exist

As per our discussion, do you think doing it in a way similar to [this](https://github.com/openjdk/jdk/pull/23988/files#diff-65002682c363b32a2f5bc860ec7482f3682cceb2d2c748e5b9d3aa4aedf88d35R66-R72) would be easier to read during a debug?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23989#discussion_r1989582660
PR Review Comment: https://git.openjdk.org/jdk/pull/23989#discussion_r1989547147


More information about the security-dev mailing list