diff -r 3b3e23e67329 -r 3651128c74eb langtools/src/share/classes/com/sun/tools/javadoc/JavadocTool.java --- a/langtools/src/share/classes/com/sun/tools/javadoc/JavadocTool.java Wed Dec 18 19:22:58 2013 +0000 +++ b/langtools/src/share/classes/com/sun/tools/javadoc/JavadocTool.java Wed Dec 18 16:05:18 2013 -0500 @@ -136,9 +136,9 @@ docenv.legacyDoclet = legacyDoclet; javadocReader.sourceCompleter = docClasses ? null : thisCompleter; - ListBuffer names = new ListBuffer(); - ListBuffer classTrees = new ListBuffer(); - ListBuffer packTrees = new ListBuffer(); + ListBuffer names = new ListBuffer<>(); + ListBuffer classTrees = new ListBuffer<>(); + ListBuffer packTrees = new ListBuffer<>(); try { StandardJavaFileManager fm = docenv.fileManager instanceof StandardJavaFileManager @@ -226,7 +226,7 @@ if (files == null) { Location location = docenv.fileManager.hasLocation(StandardLocation.SOURCE_PATH) ? StandardLocation.SOURCE_PATH : StandardLocation.CLASS_PATH; - ListBuffer lb = new ListBuffer(); + ListBuffer lb = new ListBuffer<>(); for (JavaFileObject fo: docenv.fileManager.list( location, name, EnumSet.of(JavaFileObject.Kind.SOURCE), false)) { String binaryName = docenv.fileManager.inferBinaryName(location, fo); @@ -259,10 +259,9 @@ ListBuffer packages, List excludedPackages) throws IOException { - Map> packageFiles = - new HashMap>(); + Map> packageFiles = new HashMap<>(); - Map includedPackages = new HashMap(); + Map includedPackages = new HashMap<>(); includedPackages.put("", true); for (String p: excludedPackages) includedPackages.put(p, false); @@ -427,7 +426,7 @@ * From a list of top level trees, return the list of contained class definitions */ List listClasses(List trees) { - ListBuffer result = new ListBuffer(); + ListBuffer result = new ListBuffer<>(); for (JCCompilationUnit t : trees) { for (JCTree def : t.defs) { if (def.hasTag(JCTree.Tag.CLASSDEF))