langtools/src/share/classes/com/sun/tools/javadoc/JavadocTool.java
changeset 22163 3651128c74eb
parent 19921 58bcbe156057
child 23116 4c134ccd6b8d
--- 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<String> names = new ListBuffer<String>();
-        ListBuffer<JCCompilationUnit> classTrees = new ListBuffer<JCCompilationUnit>();
-        ListBuffer<JCCompilationUnit> packTrees = new ListBuffer<JCCompilationUnit>();
+        ListBuffer<String> names = new ListBuffer<>();
+        ListBuffer<JCCompilationUnit> classTrees = new ListBuffer<>();
+        ListBuffer<JCCompilationUnit> 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<JavaFileObject> lb = new ListBuffer<JavaFileObject>();
+            ListBuffer<JavaFileObject> 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<String> packages,
             List<String> excludedPackages)
             throws IOException {
-        Map<String,List<JavaFileObject>> packageFiles =
-                new HashMap<String,List<JavaFileObject>>();
+        Map<String,List<JavaFileObject>> packageFiles = new HashMap<>();
 
-        Map<String,Boolean> includedPackages = new HashMap<String,Boolean>();
+        Map<String,Boolean> 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<JCClassDecl> listClasses(List<JCCompilationUnit> trees) {
-        ListBuffer<JCClassDecl> result = new ListBuffer<JCClassDecl>();
+        ListBuffer<JCClassDecl> result = new ListBuffer<>();
         for (JCCompilationUnit t : trees) {
             for (JCTree def : t.defs) {
                 if (def.hasTag(JCTree.Tag.CLASSDEF))