-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
None
-
b15
There are 3 places in test with similar code
private static Path fetch????(Class<?> clazz) {
try {
return ArtifactResolver.resolve(clazz).entrySet().stream()
.findAny().get().getValue();
} catch (ArtifactResolverException e) {
Throwable cause = e.getCause();
if (cause == null) {
throw new SkippedException("Cannot resolve artifact, "
+ "please check if JIB jar is present in classpath.", e);
}
throw new SkippedException("Fetch artifact failed: " + clazz, e);
}
}
It can be combined into one utility method.
private static Path fetch????(Class<?> clazz) {
try {
return ArtifactResolver.resolve(clazz).entrySet().stream()
.findAny().get().getValue();
} catch (ArtifactResolverException e) {
Throwable cause = e.getCause();
if (cause == null) {
throw new SkippedException("Cannot resolve artifact, "
+ "please check if JIB jar is present in classpath.", e);
}
throw new SkippedException("Fetch artifact failed: " + clazz, e);
}
}
It can be combined into one utility method.
- links to
-
Commit(master) openjdk/jdk/e62becc6
-
Review(master) openjdk/jdk/23989