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

Matthew Donovan mdonovan at openjdk.org
Wed Mar 12 15:29:36 UTC 2025


On Wed, 12 Mar 2025 13:31:56 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Matthew Donovan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Changed exception message in Artifact resolver and fixed logic in keytool test
>
> test/lib/jdk/test/lib/artifacts/ArtifactResolver.java line 103:
> 
>> 101:                 message = "Cannot find the artifact " + artifact.name();
>> 102:             } else {
>> 103:                 message = "Class " + klass.getName() + " missing @Artifact annotation.";
> 
> I assume it's a bug if `klass` is not annotated with `@Artifact`. I'd rather throw an NPE here so we can notice it.

Do you mean to just assume `artifact` is never null and let the NPE be thrown if it is?

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

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


More information about the security-dev mailing list