diff -r 0c72984b7a4d -r 93f8eae31092 langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java --- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java Mon Sep 23 10:10:07 2013 +0200 +++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java Mon Sep 23 10:42:38 2013 +0200 @@ -233,7 +233,7 @@ * When traversing the AST we keep the "frames" of visited * trees in order to determine the position of annotations. */ - private ListBuffer frames = ListBuffer.lb(); + private ListBuffer frames = new ListBuffer<>(); protected void push(JCTree t) { frames = frames.prepend(t); } protected JCTree pop() { return frames.next(); } @@ -381,7 +381,7 @@ } JCArrayTypeTree arTree = arrayTypeTree(typetree); - ListBuffer depth = ListBuffer.lb(); + ListBuffer depth = new ListBuffer<>(); depth = depth.append(TypePathEntry.ARRAY); while (arType.elemtype.hasTag(TypeTag.ARRAY)) { if (arType.elemtype.isAnnotated()) { @@ -473,7 +473,7 @@ // the correct nesting. // The genericLocation for the annotation. - ListBuffer depth = ListBuffer.lb(); + ListBuffer depth = new ListBuffer<>(); Type topTy = enclTy; while (enclEl != null && @@ -793,7 +793,7 @@ } case ARRAY_TYPE: { - ListBuffer index = ListBuffer.lb(); + ListBuffer index = new ListBuffer<>(); index = index.append(TypePathEntry.ARRAY); List newPath = path.tail; while (true) { @@ -956,7 +956,7 @@ private static void locateNestedTypes(Type type, TypeAnnotationPosition p) { // The number of "steps" to get from the full type to the // left-most outer type. - ListBuffer depth = ListBuffer.lb(); + ListBuffer depth = new ListBuffer<>(); Type encl = type.getEnclosingType(); while (encl != null && @@ -1226,7 +1226,7 @@ public void visitNewArray(JCNewArray tree) { findPosition(tree, tree, tree.annotations); int dimAnnosCount = tree.dimAnnotations.size(); - ListBuffer depth = ListBuffer.lb(); + ListBuffer depth = new ListBuffer<>(); // handle annotations associated with dimensions for (int i = 0; i < dimAnnosCount; ++i) {