langtools/src/share/classes/com/sun/tools/javac/parser/DocCommentParser.java
changeset 22163 3651128c74eb
parent 22153 f9f06fcca59d
child 22692 51651a2a3443
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/DocCommentParser.java	Wed Dec 18 19:22:58 2013 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/DocCommentParser.java	Wed Dec 18 16:05:18 2013 -0500
@@ -130,7 +130,7 @@
         List<DCTree> tags = blockTags();
 
         // split body into first sentence and body
-        ListBuffer<DCTree> fs = new ListBuffer<DCTree>();
+        ListBuffer<DCTree> fs = new ListBuffer<>();
         loop:
         for (; body.nonEmpty(); body = body.tail) {
             DCTree t = body.head;
@@ -194,7 +194,7 @@
      */
     @SuppressWarnings("fallthrough")
     protected List<DCTree> blockContent() {
-        ListBuffer<DCTree> trees = new ListBuffer<DCTree>();
+        ListBuffer<DCTree> trees = new ListBuffer<>();
         textStart = -1;
 
         loop:
@@ -265,7 +265,7 @@
      * Non-standard tags are represented by {@link UnknownBlockTag}.
      */
     protected List<DCTree> blockTags() {
-        ListBuffer<DCTree> tags = new ListBuffer<DCTree>();
+        ListBuffer<DCTree> tags = new ListBuffer<>();
         while (ch == '@')
             tags.add(blockTag());
         return tags.toList();
@@ -535,7 +535,7 @@
             return List.nil();
 
         JavacParser p = fac.newParser(s.replace("...", "[]"), false, false, false);
-        ListBuffer<JCTree> paramTypes = new ListBuffer<JCTree>();
+        ListBuffer<JCTree> paramTypes = new ListBuffer<>();
         paramTypes.add(p.parseType());
 
         if (p.token().kind == TokenKind.IDENTIFIER)
@@ -614,7 +614,7 @@
      */
     @SuppressWarnings("fallthrough")
     protected List<DCTree> inlineContent() {
-        ListBuffer<DCTree> trees = new ListBuffer<DCTree>();
+        ListBuffer<DCTree> trees = new ListBuffer<>();
 
         skipWhitespace();
         int pos = bp;
@@ -792,7 +792,7 @@
      * "value" may be unquoted, single-quoted, or double-quoted.
      */
     protected List<DCTree> htmlAttrs() {
-        ListBuffer<DCTree> attrs = new ListBuffer<DCTree>();
+        ListBuffer<DCTree> attrs = new ListBuffer<>();
         skipWhitespace();
 
         loop:
@@ -803,7 +803,7 @@
             List<DCTree> value = null;
             ValueKind vkind = ValueKind.EMPTY;
             if (ch == '=') {
-                ListBuffer<DCTree> v = new ListBuffer<DCTree>();
+                ListBuffer<DCTree> v = new ListBuffer<>();
                 nextChar();
                 skipWhitespace();
                 if (ch == '\'' || ch == '"') {
@@ -990,7 +990,7 @@
     }
 
 
-    Set<String> htmlBlockTags = new HashSet<String>(Arrays.asList(
+    Set<String> htmlBlockTags = new HashSet<>(Arrays.asList(
                     "h1", "h2", "h3", "h4", "h5", "h6", "p", "pre"));
 
     protected boolean isSentenceBreak(Name n) {
@@ -1278,7 +1278,7 @@
             },
         };
 
-        tagParsers = new HashMap<Name,TagParser>();
+        tagParsers = new HashMap<>();
         for (TagParser p: parsers)
             tagParsers.put(names.fromString(p.getTreeKind().tagName), p);