# HG changeset patch # User dfazunen # Date 1494602516 0 # Node ID 191008ef907fc1949e072bbae0300e6cef8c9b67 # Parent 46de64cb5e2dbf9991ba6e506aa4dd2d15a3858b# Parent d5e1d3d5e00419f65b161a8d952a14584afcdebf Merge diff -r 46de64cb5e2d -r 191008ef907f test/lib/jdk/test/lib/artifacts/ArtifactResolver.java --- a/test/lib/jdk/test/lib/artifacts/ArtifactResolver.java Fri May 12 18:06:36 2017 +0300 +++ b/test/lib/jdk/test/lib/artifacts/ArtifactResolver.java Fri May 12 15:21:56 2017 +0000 @@ -26,9 +26,10 @@ import java.io.FileNotFoundException; import java.nio.file.Path; import java.util.HashMap; +import java.util.Map; public class ArtifactResolver { - public static HashMap resolve(Class klass) throws FileNotFoundException { + public static Map resolve(Class klass) throws FileNotFoundException { ArtifactManager manager = new DefaultArtifactManager(); try { String managerName = System.getProperty("jdk.test.lib.artifacts.artifactmanager"); @@ -41,12 +42,12 @@ // If we end up here, we'll use the DefaultArtifactManager } - ArtifactContainer artifactContainer = (ArtifactContainer) klass.getAnnotation(ArtifactContainer.class); + ArtifactContainer artifactContainer = klass.getAnnotation(ArtifactContainer.class); HashMap locations = new HashMap<>(); Artifact[] artifacts; if (artifactContainer == null) { - artifacts = new Artifact[]{(Artifact) klass.getAnnotation(Artifact.class)}; + artifacts = new Artifact[]{klass.getAnnotation(Artifact.class)}; } else { artifacts = artifactContainer.value(); }