--- a/langtools/src/share/classes/com/sun/tools/classfile/Dependencies.java Wed Dec 18 19:22:58 2013 +0000
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Dependencies.java Wed Dec 18 16:05:18 2013 -0500
@@ -245,7 +245,7 @@
ClassFileReader classFinder, Set<String> rootClassNames,
boolean transitiveClosure)
throws ClassFileNotFoundException {
- final Set<Dependency> results = new HashSet<Dependency>();
+ final Set<Dependency> results = new HashSet<>();
Recorder r = new Recorder() {
public void addDependency(Dependency d) {
results.add(d);
@@ -276,7 +276,7 @@
ClassFileReader classFinder, Set<String> rootClassNames,
boolean transitiveClosure, Recorder recorder)
throws ClassFileNotFoundException {
- Set<String> doneClasses = new HashSet<String>();
+ Set<String> doneClasses = new HashSet<>();
getFinder(); // ensure initialized
getFilter(); // ensure initialized
@@ -284,7 +284,7 @@
// Work queue of names of classfiles to be searched.
// Entries will be unique, and for classes that do not yet have
// dependencies in the results map.
- Deque<String> deque = new LinkedList<String>(rootClassNames);
+ Deque<String> deque = new LinkedList<>(rootClassNames);
String className;
while ((className = deque.poll()) != null) {
@@ -560,7 +560,7 @@
}
static abstract class BasicDependencyFinder implements Finder {
- private Map<String,Location> locations = new HashMap<String,Location>();
+ private Map<String,Location> locations = new HashMap<>();
Location getLocation(String className) {
Location l = locations.get(className);
@@ -578,7 +578,7 @@
try {
constant_pool = classFile.constant_pool;
origin = getLocation(classFile.getName());
- deps = new HashSet<Dependency>();
+ deps = new HashSet<>();
} catch (ConstantPoolException e) {
throw new ClassFileError(e);
}