--- a/langtools/src/share/classes/com/sun/tools/javac/util/BaseFileManager.java Wed Dec 18 19:22:58 2013 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/BaseFileManager.java Wed Dec 18 16:05:18 2013 -0500
@@ -122,7 +122,7 @@
Class.forName(classLoaderClass).asSubclass(ClassLoader.class);
Class<?>[] constrArgTypes = { URL[].class, ClassLoader.class };
Constructor<? extends ClassLoader> constr = loader.getConstructor(constrArgTypes);
- return constr.newInstance(new Object[] { urls, thisClassLoader });
+ return constr.newInstance(urls, thisClassLoader);
} catch (Throwable t) {
// ignore errors loading user-provided class loader, fall through
}
@@ -356,8 +356,7 @@
contentCache.remove(file);
}
- protected final Map<JavaFileObject, ContentCacheEntry> contentCache
- = new HashMap<JavaFileObject, ContentCacheEntry>();
+ protected final Map<JavaFileObject, ContentCacheEntry> contentCache = new HashMap<>();
protected static class ContentCacheEntry {
final long timestamp;
@@ -365,7 +364,7 @@
ContentCacheEntry(JavaFileObject file, CharBuffer cb) {
this.timestamp = file.getLastModified();
- this.ref = new SoftReference<CharBuffer>(cb);
+ this.ref = new SoftReference<>(cb);
}
boolean isValid(JavaFileObject file) {