test/lib/jdk/test/lib/artifacts/DefaultArtifactManager.java
changeset 49201 e59941f7247d
parent 46196 822ca950ddaa
equal deleted inserted replaced
49200:a19a6228cdb2 49201:e59941f7247d
    27 import java.nio.file.Path;
    27 import java.nio.file.Path;
    28 import java.nio.file.Paths;
    28 import java.nio.file.Paths;
    29 
    29 
    30 public class DefaultArtifactManager implements ArtifactManager {
    30 public class DefaultArtifactManager implements ArtifactManager {
    31     @Override
    31     @Override
    32     public Path resolve(Artifact artifact) throws FileNotFoundException {
    32     public Path resolve(Artifact artifact) throws ArtifactResolverException {
    33         String name = artifact.name();
    33         String name = artifact.name();
    34         String location = System.getProperty(artifactProperty(name));
    34         String location = System.getProperty(artifactProperty(name));
    35         if (location == null) {
    35         if (location == null) {
    36             throw new FileNotFoundException("Couldn't automatically resolve dependency for " + name + " , revision " + artifact.revision() + "\n" +
    36             throw new ArtifactResolverException("Couldn't automatically resolve dependency for " + name
    37                                             "Please specify the location using " + artifactProperty(name));
    37                     + " , revision " + artifact.revision() + "\n" +
       
    38                     "Please specify the location using " + artifactProperty(name));
    38         }
    39         }
    39         return Paths.get(location);
    40         return Paths.get(location);
    40     }
    41     }
    41 
    42 
    42     private static String artifactProperty(String name) {
    43     private static String artifactProperty(String name) {