mirror of
https://github.com/darlinghq/darling-openjdk.git
synced 2024-12-11 22:33:36 +00:00
8215991: Stop hiding exception from ArtifactResolver failures in tests
Reviewed-by: tbell, ctornqvi
This commit is contained in:
parent
a5765901b3
commit
ee69ace28a
@ -29,16 +29,18 @@ import java.util.Map;
|
||||
|
||||
public class ArtifactResolver {
|
||||
public static Map<String, Path> resolve(Class<?> klass) throws ArtifactResolverException {
|
||||
ArtifactManager manager = new DefaultArtifactManager();
|
||||
ArtifactManager manager;
|
||||
try {
|
||||
String managerName = System.getProperty("jdk.test.lib.artifacts.artifactmanager");
|
||||
if (managerName != null) {
|
||||
manager = (ArtifactManager) Class.forName(managerName).newInstance();
|
||||
} else if (System.getenv().containsKey(JibArtifactManager.JIB_HOME_ENV_NAME)) {
|
||||
manager = JibArtifactManager.newInstance();
|
||||
} else {
|
||||
manager = new DefaultArtifactManager();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// If we end up here, we'll use the DefaultArtifactManager
|
||||
throw new ArtifactResolverException("Failed to load ArtifactManager", e);
|
||||
}
|
||||
|
||||
ArtifactContainer artifactContainer = klass.getAnnotation(ArtifactContainer.class);
|
||||
|
Loading…
Reference in New Issue
Block a user