diff -r 4d8af6fda907 -r defadd528513 src/share/classes/com/sun/tools/jdeps/Archive.java --- a/src/share/classes/com/sun/tools/jdeps/Archive.java Thu Oct 17 13:50:00 2013 +0200 +++ b/src/share/classes/com/sun/tools/jdeps/Archive.java Thu Oct 17 13:19:48 2013 -0700 @@ -25,7 +25,7 @@ package com.sun.tools.jdeps; import com.sun.tools.classfile.Dependency.Location; -import java.io.File; +import java.nio.file.Path; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -35,21 +35,20 @@ * Represents the source of the class files. */ public class Archive { - private final File file; + private final Path path; private final String filename; private final ClassFileReader reader; - private final Map> deps - = new HashMap>(); + private final Map> deps = new HashMap<>(); public Archive(String name) { - this.file = null; + this.path = null; this.filename = name; this.reader = null; } - public Archive(File f, ClassFileReader reader) { - this.file = f; - this.filename = f.getName(); + public Archive(Path p, ClassFileReader reader) { + this.path = p; + this.filename = path.getFileName().toString(); this.reader = reader; } @@ -64,14 +63,14 @@ public void addClass(Location origin) { Set set = deps.get(origin); if (set == null) { - set = new HashSet(); + set = new HashSet<>(); deps.put(origin, set); } } public void addClass(Location origin, Location target) { Set set = deps.get(origin); if (set == null) { - set = new HashSet(); + set = new HashSet<>(); deps.put(origin, set); } set.add(target); @@ -87,7 +86,7 @@ } public String toString() { - return file != null ? file.getPath() : filename; + return path != null ? path.toString() : filename; } interface Visitor {