8171371: Remove redundant type-arguments from generic method calls
authormcimadamore
Fri, 16 Dec 2016 15:27:47 +0000
changeset 42828 cce89649f958
parent 42827 36468b5fa7f4
child 42830 f03e5edfe696
8171371: Remove redundant type-arguments from generic method calls Reviewed-by: jjg, rfield, mchung
langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/HtmlTag.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/SymbolMetadata.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Context.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/List.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/ListBuffer.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/CompileJavaPackages.java
langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBuilder.java
langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocument.java
langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/Start.java
langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/WildcardTypeImpl.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/ContentBuilder.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlDocument.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java
langtools/src/jdk.jshell/share/classes/jdk/jshell/Corraller.java
langtools/src/jdk.jshell/share/classes/jdk/jshell/ReplParser.java
langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/HtmlTag.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/HtmlTag.java	Fri Dec 16 15:27:47 2016 +0000
@@ -556,11 +556,11 @@
     private final Map<Attr,AttrKind> attrs;
 
     HtmlTag(BlockType blockType, EndKind endKind, AttrMap... attrMaps) {
-        this(HtmlVersion.ALL, blockType, endKind, Collections.<Flag>emptySet(), attrMaps);
+        this(HtmlVersion.ALL, blockType, endKind, Collections.emptySet(), attrMaps);
     }
 
     HtmlTag(HtmlVersion allowedVersion, BlockType blockType, EndKind endKind, AttrMap... attrMaps) {
-        this(allowedVersion, blockType, endKind, Collections.<Flag>emptySet(), attrMaps);
+        this(allowedVersion, blockType, endKind, Collections.emptySet(), attrMaps);
     }
 
     HtmlTag(BlockType blockType, EndKind endKind, Set<Flag> flags, AttrMap... attrMaps) {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java	Fri Dec 16 15:27:47 2016 +0000
@@ -225,7 +225,7 @@
 
     @Override @DefinedBy(Api.COMPILER_TREE)
     public Iterable<? extends CompilationUnitTree> parse() {
-        return handleExceptions(this::parseInternal, List.<CompilationUnitTree>nil(), List.<CompilationUnitTree>nil());
+        return handleExceptions(this::parseInternal, List.nil(), List.nil());
     }
 
     private Iterable<? extends CompilationUnitTree> parseInternal() {
@@ -352,7 +352,7 @@
 
     @Override @DefinedBy(Api.COMPILER_TREE)
     public Iterable<? extends Element> analyze() {
-        return handleExceptions(() -> analyze(null), List.<Element>nil(), List.<Element>nil());
+        return handleExceptions(() -> analyze(null), List.nil(), List.nil());
     }
 
     /**
@@ -414,7 +414,7 @@
 
     @Override @DefinedBy(Api.COMPILER_TREE)
     public Iterable<? extends JavaFileObject> generate() {
-        return handleExceptions(() -> generate(null), List.<JavaFileObject>nil(), List.<JavaFileObject>nil());
+        return handleExceptions(() -> generate(null), List.nil(), List.nil());
     }
 
     /**
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java	Fri Dec 16 15:27:47 2016 +0000
@@ -437,7 +437,7 @@
                 Type t = attr.attribType(ref.qualifierExpression, env);
                 if (t.isErroneous()) {
                     JCCompilationUnit toplevel =
-                        treeMaker.TopLevel(List.<JCTree>nil());
+                        treeMaker.TopLevel(List.nil());
                     final ModuleSymbol msym = modules.getDefaultModule();
                     toplevel.modle = msym;
                     toplevel.packge = msym.unnamedPackage;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java	Fri Dec 16 15:27:47 2016 +0000
@@ -809,7 +809,7 @@
 
             @Override
             public Iterable<Symbol> getSymbols(Filter<Symbol> sf, LookupKind lookupKind) {
-                return sf == null || sf.accepts(sym) ? content : Collections.<Symbol>emptyList();
+                return sf == null || sf.accepts(sym) ? content : Collections.emptyList();
             }
 
             @Override
@@ -817,7 +817,7 @@
                                                      Filter<Symbol> sf,
                                                      LookupKind lookupKind) {
                 return sym.name == name &&
-                       (sf == null || sf.accepts(sym)) ? content : Collections.<Symbol>emptyList();
+                       (sf == null || sf.accepts(sym)) ? content : Collections.emptyList();
             }
 
             @Override
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java	Fri Dec 16 15:27:47 2016 +0000
@@ -140,7 +140,7 @@
      */
     public List<Attribute.Compound> getRawAttributes() {
         return (metadata == null)
-                ? List.<Attribute.Compound>nil()
+                ? List.nil()
                 : metadata.getDeclarationAttributes();
     }
 
@@ -150,7 +150,7 @@
      */
     public List<Attribute.TypeCompound> getRawTypeAttributes() {
         return (metadata == null)
-                ? List.<Attribute.TypeCompound>nil()
+                ? List.nil()
                 : metadata.getTypeAttributes();
     }
 
@@ -192,13 +192,13 @@
 
     public List<Attribute.TypeCompound> getClassInitTypeAttributes() {
         return (metadata == null)
-                ? List.<Attribute.TypeCompound>nil()
+                ? List.nil()
                 : metadata.getClassInitTypeAttributes();
     }
 
     public List<Attribute.TypeCompound> getInitTypeAttributes() {
         return (metadata == null)
-                ? List.<Attribute.TypeCompound>nil()
+                ? List.nil()
                 : metadata.getInitTypeAttributes();
     }
 
@@ -212,7 +212,7 @@
 
     public List<Attribute.Compound> getDeclarationAttributes() {
         return (metadata == null)
-                ? List.<Attribute.Compound>nil()
+                ? List.nil()
                 : metadata.getDeclarationAttributes();
     }
 
@@ -1248,7 +1248,7 @@
         public Type erasure(Types types) {
             if (erasure_field == null)
                 erasure_field = new ClassType(types.erasure(type.getEnclosingType()),
-                                              List.<Type>nil(), this,
+                                              List.nil(), this,
                                               type.getMetadata());
             return erasure_field;
         }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/SymbolMetadata.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/SymbolMetadata.java	Fri Dec 16 15:27:47 2016 +0000
@@ -72,19 +72,19 @@
      * Type attributes for this symbol.
      * This field should never be null.
      */
-    private List<Attribute.TypeCompound> type_attributes = List.<Attribute.TypeCompound>nil();
+    private List<Attribute.TypeCompound> type_attributes = List.nil();
 
     /*
      * Type attributes of initializers in this class.
      * Unused if the current symbol is not a ClassSymbol.
      */
-    private List<Attribute.TypeCompound> init_type_attributes = List.<Attribute.TypeCompound>nil();
+    private List<Attribute.TypeCompound> init_type_attributes = List.nil();
 
     /*
      * Type attributes of class initializers in this class.
      * Unused if the current symbol is not a ClassSymbol.
      */
-    private List<Attribute.TypeCompound> clinit_type_attributes = List.<Attribute.TypeCompound>nil();
+    private List<Attribute.TypeCompound> clinit_type_attributes = List.nil();
 
     /*
      * The Symbol this SymbolMetadata instance belongs to
@@ -248,7 +248,7 @@
 
     private List<Attribute.Compound> filterDeclSentinels(List<Attribute.Compound> a) {
         return (a == DECL_IN_PROGRESS || a == DECL_NOT_STARTED)
-                ? List.<Attribute.Compound>nil()
+                ? List.nil()
                 : a;
     }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java	Fri Dec 16 15:27:47 2016 +0000
@@ -309,14 +309,14 @@
                     MethodSymbol boxMethod =
                         new MethodSymbol(PUBLIC | STATIC, names.valueOf,
                                          new MethodType(List.of(type), sym.type,
-                                List.<Type>nil(), methodClass),
+                                List.nil(), methodClass),
                             sym);
                     sym.members().enter(boxMethod);
                     MethodSymbol unboxMethod =
                         new MethodSymbol(PUBLIC,
                             type.tsym.name.append(names.Value), // x.intValue()
-                            new MethodType(List.<Type>nil(), type,
-                                List.<Type>nil(), methodClass),
+                            new MethodType(List.nil(), type,
+                                List.nil(), methodClass),
                             sym);
                     sym.members().enter(unboxMethod);
                 }
@@ -514,8 +514,8 @@
         enumFinalFinalize =
             new MethodSymbol(PROTECTED|FINAL|HYPOTHETICAL,
                              names.finalize,
-                             new MethodType(List.<Type>nil(), voidType,
-                                            List.<Type>nil(), methodClass),
+                             new MethodType(List.nil(), voidType,
+                                            List.nil(), methodClass),
                              enumSym);
         listType = enterClass("java.util.List");
         collectionsType = enterClass("java.util.Collections");
@@ -538,7 +538,7 @@
         autoCloseableType = enterClass("java.lang.AutoCloseable");
         autoCloseableClose = new MethodSymbol(PUBLIC,
                              names.close,
-                             new MethodType(List.<Type>nil(), voidType,
+                             new MethodType(List.nil(), voidType,
                                             List.of(exceptionType), methodClass),
                              autoCloseableType.tsym);
         trustMeType = enterClass("java.lang.SafeVarargs");
@@ -584,8 +584,8 @@
         arrayCloneMethod = new MethodSymbol(
             PUBLIC,
             names.clone,
-            new MethodType(List.<Type>nil(), objectType,
-                           List.<Type>nil(), methodClass),
+            new MethodType(List.nil(), objectType,
+                           List.nil(), methodClass),
             arrayClass);
         arrayClass.members().enter(arrayCloneMethod);
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java	Fri Dec 16 15:27:47 2016 +0000
@@ -1164,7 +1164,7 @@
     public static class ErasedClassType extends ClassType {
         public ErasedClassType(Type outer, TypeSymbol tsym,
                                TypeMetadata metadata) {
-            super(outer, List.<Type>nil(), tsym, metadata);
+            super(outer, List.nil(), tsym, metadata);
         }
 
         @Override
@@ -1235,7 +1235,7 @@
         public IntersectionClassType(List<Type> bounds, ClassSymbol csym, boolean allInterfaces) {
             // Presently no way to refer to this type directly, so we
             // cannot put annotations directly on it.
-            super(Type.noType, List.<Type>nil(), csym);
+            super(Type.noType, List.nil(), csym);
             this.allInterfaces = allInterfaces;
             Assert.check((csym.flags() & COMPOUND) != 0);
             supertype_field = bounds.head;
@@ -2316,14 +2316,14 @@
         }
 
         public ErrorType(Type originalType, TypeSymbol tsym) {
-            super(noType, List.<Type>nil(), null);
+            super(noType, List.nil(), null);
             this.tsym = tsym;
             this.originalType = (originalType == null ? noType : originalType);
         }
 
         private ErrorType(Type originalType, TypeSymbol tsym,
                           TypeMetadata metadata) {
-            super(noType, List.<Type>nil(), null, metadata);
+            super(noType, List.nil(), null, metadata);
             this.tsym = tsym;
             this.originalType = (originalType == null ? noType : originalType);
         }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Fri Dec 16 15:27:47 2016 +0000
@@ -588,7 +588,7 @@
         csym.members_field = WriteableScope.create(csym);
         MethodSymbol instDescSym = new MethodSymbol(descSym.flags(), descSym.name, descType, csym);
         csym.members_field.enter(instDescSym);
-        Type.ClassType ctype = new Type.ClassType(Type.noType, List.<Type>nil(), csym);
+        Type.ClassType ctype = new Type.ClassType(Type.noType, List.nil(), csym);
         ctype.supertype_field = syms.objectType;
         ctype.interfaces_field = targets;
         csym.type = ctype;
@@ -3162,7 +3162,7 @@
                                      t.getMetadata());
             // the new bound should use the new type variable in place
             // of the old
-            tv.bound = subst(bound1, List.<Type>of(t), List.<Type>of(tv));
+            tv.bound = subst(bound1, List.of(t), List.of(tv));
             return tv;
         }
     }
@@ -3762,7 +3762,7 @@
                 List<Type> lci = List.of(asSuper(ts[startIdx], erasedSupertype.tsym));
                 for (int i = startIdx + 1 ; i < ts.length ; i++) {
                     Type superType = asSuper(ts[i], erasedSupertype.tsym);
-                    lci = intersect(lci, superType != null ? List.of(superType) : List.<Type>nil());
+                    lci = intersect(lci, superType != null ? List.of(superType) : List.nil());
                 }
                 candidates = candidates.appendList(lci);
             }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Fri Dec 16 15:27:47 2016 +0000
@@ -484,7 +484,7 @@
         JCIdent left = (JCIdent)assign.lhs;
         Symbol method = resolve.resolveQualifiedMethod(elidedValue ? assign.rhs.pos() : left.pos(),
                 env, thisAnnotationType,
-                left.name, List.<Type>nil(), null);
+                left.name, List.nil(), null);
         left.sym = method;
         left.type = method.type;
         if (method.owner != thisAnnotationType.tsym && !badAnnotation)
@@ -626,7 +626,7 @@
         // Special case, implicit array
         if (!tree.hasTag(NEWARRAY)) {
             tree = make.at(tree.pos).
-                    NewArray(null, List.<JCExpression>nil(), List.of(tree));
+                    NewArray(null, List.nil(), List.of(tree));
         }
 
         JCNewArray na = (JCNewArray)tree;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Dec 16 15:27:47 2016 +0000
@@ -1052,8 +1052,8 @@
                             !TreeInfo.isSelfCall(body.stats.head)) {
                         body.stats = body.stats.
                                 prepend(typeEnter.SuperCall(make.at(body.pos),
-                                        List.<Type>nil(),
-                                        List.<JCVariableDecl>nil(),
+                                        List.nil(),
+                                        List.nil(),
                                         false));
                     } else if ((env.enclClass.sym.flags() & ENUM) != 0 &&
                             (tree.mods.flags & GENERATEDCONSTR) == 0 &&
@@ -1453,8 +1453,8 @@
                         env,
                         types.skipTypeVars(resource, false),
                         names.close,
-                        List.<Type>nil(),
-                        List.<Type>nil());
+                        List.nil(),
+                        List.nil());
             }
             finally {
                 log.popDiagnosticHandler(discardHandler);
@@ -1915,7 +1915,7 @@
                     argtypes.isEmpty()) {
                 // as a special case, x.getClass() has type Class<? extends |X|>
                 return new ClassType(restype.getEnclosingType(),
-                        List.<Type>of(new WildcardType(types.erasure(qualifierType),
+                        List.of(new WildcardType(types.erasure(qualifierType),
                                 BoundKind.EXTENDS,
                                 syms.boundClass)),
                         restype.tsym,
@@ -1953,7 +1953,7 @@
         /** Obtain a method type with given argument types.
          */
         Type newMethodTemplate(Type restype, List<Type> argtypes, List<Type> typeargtypes) {
-            MethodType mt = new MethodType(argtypes, restype, List.<Type>nil(), syms.methodClass);
+            MethodType mt = new MethodType(argtypes, restype, List.nil(), syms.methodClass);
             return (typeargtypes == null) ? mt : (Type)new ForAll(typeargtypes, mt);
         }
 
@@ -2635,7 +2635,7 @@
                     return new MethodType(argtypes, Type.recoveryType,
                             List.of(syms.throwableType), syms.methodClass);
                 case REFERENCE:
-                    return new MethodType(List.<Type>nil(), Type.recoveryType,
+                    return new MethodType(List.nil(), Type.recoveryType,
                             List.of(syms.throwableType), syms.methodClass);
                 default:
                     Assert.error("Cannot get here!");
@@ -2797,11 +2797,11 @@
                      */
                     MethodSymbol clinit = clinits.get(enclClass);
                     if (clinit == null) {
-                        Type clinitType = new MethodType(List.<Type>nil(),
-                                syms.voidType, List.<Type>nil(), syms.methodClass);
+                        Type clinitType = new MethodType(List.nil(),
+                                syms.voidType, List.nil(), syms.methodClass);
                         clinit = new MethodSymbol(STATIC | SYNTHETIC | PRIVATE,
                                 names.clinit, clinitType, enclClass);
-                        clinit.params = List.<VarSymbol>nil();
+                        clinit.params = List.nil();
                         clinits.put(enclClass, clinit);
                     }
                     newScopeOwner = clinit;
@@ -3716,7 +3716,7 @@
                             normOuter = types.erasure(ownOuter);
                         if (normOuter != ownOuter)
                             owntype = new ClassType(
-                                normOuter, List.<Type>nil(), owntype.tsym,
+                                normOuter, List.nil(), owntype.tsym,
                                 owntype.getMetadata());
                     }
                 }
@@ -4217,8 +4217,8 @@
             }
             JCClassDecl cd = make.at(tree).ClassDef(
                 make.Modifiers(PUBLIC | ABSTRACT),
-                names.empty, List.<JCTypeParameter>nil(),
-                extending, implementing, List.<JCTree>nil());
+                names.empty, List.nil(),
+                extending, implementing, List.nil());
 
             ClassSymbol c = (ClassSymbol)owntype.tsym;
             Assert.check((c.flags() & COMPOUND) != 0);
@@ -4895,8 +4895,8 @@
                 if (prim.typetag == VOID)
                     restype = syms.voidType;
             }
-            return new MethodType(List.<Type>nil(), restype,
-                                  List.<Type>nil(), syms.methodClass);
+            return new MethodType(List.nil(), restype,
+                                  List.nil(), syms.methodClass);
         }
         private Type dummyMethodType() {
             return dummyMethodType(null);
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Fri Dec 16 15:27:47 2016 +0000
@@ -2163,7 +2163,7 @@
                         log.useSource(prevSource.getFile());
                     }
                 } else if (sym.kind == TYP) {
-                    checkClass(pos, sym, List.<JCTree>nil());
+                    checkClass(pos, sym, List.nil());
                 }
             } else {
                 //not completed yet
@@ -2255,7 +2255,7 @@
 
 
     void checkNonCyclic(DiagnosticPosition pos, TypeVar t) {
-        checkNonCyclic1(pos, t, List.<TypeVar>nil());
+        checkNonCyclic1(pos, t, List.nil());
     }
 
     private void checkNonCyclic1(DiagnosticPosition pos, Type t, List<TypeVar> seen) {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java	Fri Dec 16 15:27:47 2016 +0000
@@ -130,10 +130,10 @@
         predefClassDef = make.ClassDef(
             make.Modifiers(PUBLIC),
             syms.predefClass.name,
-            List.<JCTypeParameter>nil(),
+            List.nil(),
             null,
-            List.<JCExpression>nil(),
-            List.<JCTree>nil());
+            List.nil(),
+            List.nil());
         predefClassDef.sym = syms.predefClass;
         todo = Todo.instance(context);
         fileManager = context.get(JavaFileManager.class);
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java	Fri Dec 16 15:27:47 2016 +0000
@@ -1092,8 +1092,8 @@
                                 attrEnv,
                                 types.skipTypeVars(sup, false),
                                 names.close,
-                                List.<Type>nil(),
-                                List.<Type>nil());
+                                List.nil(),
+                                List.nil());
                         Type mt = types.memberType(resource.type, closeMethod);
                         if (closeMethod.kind == MTH) {
                             for (Type t : mt.getThrownTypes()) {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java	Fri Dec 16 15:27:47 2016 +0000
@@ -120,7 +120,7 @@
         dependenciesFolder = options.get("debug.dumpInferenceGraphsTo");
         pendingGraphs = List.nil();
 
-        emptyContext = new InferenceContext(this, List.<Type>nil());
+        emptyContext = new InferenceContext(this, List.nil());
     }
 
     /** A value for prototypes that admit any type, including polymorphic ones. */
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Fri Dec 16 15:27:47 2016 +0000
@@ -179,7 +179,7 @@
             appendedMethodList = new ListBuffer<>();
             deserializeCases = new HashMap<>();
             MethodType type = new MethodType(List.of(syms.serializedLambdaType), syms.objectType,
-                    List.<Type>nil(), syms.methodClass);
+                    List.nil(), syms.methodClass);
             deserMethodSym = makePrivateSyntheticMethod(STATIC, names.deserializeLambda, type, clazz.sym);
             deserParamSym = new VarSymbol(FINAL, names.fromString("lambda"),
                     syms.serializedLambdaType, deserMethodSym);
@@ -310,10 +310,10 @@
         JCMethodDecl lambdaDecl = make.MethodDef(make.Modifiers(sym.flags_field),
                 sym.name,
                 make.QualIdent(lambdaType.getReturnType().tsym),
-                List.<JCTypeParameter>nil(),
+                List.nil(),
                 localContext.syntheticParams,
                 lambdaType.getThrownTypes() == null ?
-                    List.<JCExpression>nil() :
+                    List.nil() :
                     make.Types(lambdaType.getThrownTypes()),
                 null,
                 null);
@@ -447,7 +447,7 @@
                 throw new InternalError("Should not have an invalid kind");
         }
 
-        List<JCExpression> indy_args = init==null? List.<JCExpression>nil() : translate(List.of(init), localContext.prev);
+        List<JCExpression> indy_args = init==null? List.nil() : translate(List.of(init), localContext.prev);
 
 
         //build a sam instance using an indy call to the meta-factory
@@ -556,7 +556,7 @@
                 //target is void:
                 // BODY;
                 JCStatement stat = make.at(expr).Exec(expr);
-                return make.Block(0, List.<JCStatement>of(stat));
+                return make.Block(0, List.of(stat));
             } else if (isLambda_void && isTarget_Void) {
                 //void to Void conversion:
                 // BODY; return null;
@@ -568,7 +568,7 @@
                 //non-void to non-void conversion:
                 // return (TYPE)BODY;
                 JCExpression retExpr = transTypes.coerce(attrEnv, expr, restype);
-                return make.at(retExpr).Block(0, List.<JCStatement>of(make.Return(retExpr)));
+                return make.at(retExpr).Block(0, List.of(make.Return(retExpr)));
             }
         } finally {
             make.at(prevPos);
@@ -602,7 +602,7 @@
                     // { TYPE $loc = RET-EXPR; return; }
                     VarSymbol loc = makeSyntheticVar(0, names.fromString("$loc"), tree.expr.type, lambdaMethodDecl.sym);
                     JCVariableDecl varDef = make.VarDef(loc, tree.expr);
-                    result = make.Block(0, List.<JCStatement>of(varDef, make.Return(null)));
+                    result = make.Block(0, List.of(varDef, make.Return(null)));
                 } else if (!isTarget_void || !isLambda_void) {
                     //non-void to non-void conversion:
                     // return (TYPE)RET-EXPR;
@@ -637,17 +637,17 @@
         for (JCBreak br : breaks) {
             br.target = sw;
         }
-        JCBlock body = make.Block(0L, List.<JCStatement>of(
+        JCBlock body = make.Block(0L, List.of(
                 sw,
                 make.Throw(makeNewClass(
                     syms.illegalArgumentExceptionType,
-                    List.<JCExpression>of(make.Literal("Invalid lambda deserialization"))))));
+                    List.of(make.Literal("Invalid lambda deserialization"))))));
         JCMethodDecl deser = make.MethodDef(make.Modifiers(kInfo.deserMethodSym.flags()),
                         names.deserializeLambda,
                         make.QualIdent(kInfo.deserMethodSym.getReturnType().tsym),
-                        List.<JCTypeParameter>nil(),
+                        List.nil(),
                         List.of(make.VarDef(kInfo.deserParamSym, null)),
-                        List.<JCExpression>nil(),
+                        List.nil(),
                         body,
                         null);
         deser.sym = kInfo.deserMethodSym;
@@ -675,7 +675,7 @@
      */
     JCNewClass makeNewClass(Type ctype, List<JCExpression> args) {
         return makeNewClass(ctype, args,
-                rs.resolveConstructor(null, attrEnv, ctype, TreeInfo.types(args), List.<Type>nil()));
+                rs.resolveConstructor(null, attrEnv, ctype, TreeInfo.types(args), List.nil()));
      }
 
     private void addDeserializationCase(int implMethodKind, Symbol refSym, Type targetType, MethodSymbol samSym,
@@ -736,12 +736,12 @@
     }
 
     private JCExpression deserTest(JCExpression prev, String func, String lit) {
-        MethodType eqmt = new MethodType(List.of(syms.objectType), syms.booleanType, List.<Type>nil(), syms.methodClass);
-        Symbol eqsym = rs.resolveQualifiedMethod(null, attrEnv, syms.objectType, names.equals, List.of(syms.objectType), List.<Type>nil());
+        MethodType eqmt = new MethodType(List.of(syms.objectType), syms.booleanType, List.nil(), syms.methodClass);
+        Symbol eqsym = rs.resolveQualifiedMethod(null, attrEnv, syms.objectType, names.equals, List.of(syms.objectType), List.nil());
         JCMethodInvocation eqtest = make.Apply(
-                List.<JCExpression>nil(),
+                List.nil(),
                 make.Select(deserGetter(func, syms.stringType), eqsym).setType(eqmt),
-                List.<JCExpression>of(make.Literal(lit)));
+                List.of(make.Literal(lit)));
         eqtest.setType(syms.booleanType);
         JCBinary compound = make.Binary(JCTree.Tag.AND, prev, eqtest);
         compound.operator = operators.resolveBinary(compound, JCTree.Tag.AND, syms.booleanType, syms.booleanType);
@@ -750,14 +750,14 @@
     }
 
     private JCExpression deserGetter(String func, Type type) {
-        return deserGetter(func, type, List.<Type>nil(), List.<JCExpression>nil());
+        return deserGetter(func, type, List.nil(), List.nil());
     }
 
     private JCExpression deserGetter(String func, Type type, List<Type> argTypes, List<JCExpression> args) {
-        MethodType getmt = new MethodType(argTypes, type, List.<Type>nil(), syms.methodClass);
-        Symbol getsym = rs.resolveQualifiedMethod(null, attrEnv, syms.serializedLambdaType, names.fromString(func), argTypes, List.<Type>nil());
+        MethodType getmt = new MethodType(argTypes, type, List.nil(), syms.methodClass);
+        Symbol getsym = rs.resolveQualifiedMethod(null, attrEnv, syms.serializedLambdaType, names.fromString(func), argTypes, List.nil());
         return make.Apply(
-                    List.<JCExpression>nil(),
+                    List.nil(),
                     make.Select(make.Ident(kInfo.deserParamSym).setType(syms.serializedLambdaType), getsym).setType(getmt),
                     args).setType(type);
     }
@@ -961,7 +961,7 @@
             select.type = tree.sym.erasure(types);
 
             //create the method call expression
-            JCExpression apply = make.Apply(List.<JCExpression>nil(), select,
+            JCExpression apply = make.Apply(List.nil(), select,
                     convertArgs(tree.sym, args.toList(), tree.varargsElement)).
                     setType(tree.sym.erasure(types).getReturnType());
 
@@ -989,7 +989,7 @@
                 //note that method reference syntax does not allow an explicit
                 //enclosing class (so the enclosing class is null)
                 JCNewClass newClass = make.NewClass(null,
-                        List.<JCExpression>nil(),
+                        List.nil(),
                         make.Type(tree.getQualifierExpression().type),
                         convertArgs(tree.sym, args.toList(), tree.varargsElement),
                         null);
@@ -1028,7 +1028,7 @@
         JCFunctionalExpression tree = context.tree;
         //determine the static bsm args
         MethodSymbol samSym = (MethodSymbol) types.findDescriptorSymbol(tree.type.tsym);
-        List<Object> staticArgs = List.<Object>of(
+        List<Object> staticArgs = List.of(
                 typeToMethodType(samSym.type),
                 new Pool.MethodHandle(refKind, refSym, types),
                 typeToMethodType(tree.getDescriptorType(types)));
@@ -1042,7 +1042,7 @@
         //finally, compute the type of the indy call
         MethodType indyType = new MethodType(indy_args_types.toList(),
                 tree.type,
-                List.<Type>nil(),
+                List.nil(),
                 syms.methodClass);
 
         Name metafactoryName = context.needsAltMetafactory() ?
@@ -1108,7 +1108,7 @@
                     syms.methodTypeType).appendList(bsmStaticArgToTypes(staticArgs));
 
             Symbol bsm = rs.resolveInternalMethod(pos, attrEnv, site,
-                    bsmName, bsm_staticArgs, List.<Type>nil());
+                    bsmName, bsm_staticArgs, List.nil());
 
             DynamicMethodSymbol dynSym =
                     new DynamicMethodSymbol(methName,
@@ -1124,7 +1124,7 @@
             qualifier.sym = dynSym;
             qualifier.type = indyType.getReturnType();
 
-            JCMethodInvocation proxyCall = make.Apply(List.<JCExpression>nil(), qualifier, indyArgs);
+            JCMethodInvocation proxyCall = make.Apply(List.nil(), qualifier, indyArgs);
             proxyCall.type = indyType.getReturnType();
             return proxyCall;
         } finally {
@@ -1622,8 +1622,8 @@
                      */
                     clinit = makePrivateSyntheticMethod(STATIC,
                             names.clinit,
-                            new MethodType(List.<Type>nil(), syms.voidType,
-                                List.<Type>nil(), syms.methodClass),
+                            new MethodType(List.nil(), syms.voidType,
+                                List.nil(), syms.methodClass),
                             csym);
                     clinits.put(csym, clinit);
                 }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Fri Dec 16 15:27:47 2016 +0000
@@ -495,7 +495,7 @@
             MethodSymbol valuesMethod = lookupMethod(pos,
                                                      names.values,
                                                      forEnum.type,
-                                                     List.<Type>nil());
+                                                     List.nil());
             JCExpression size = make // Color.values().length
                 .Select(make.App(make.QualIdent(valuesMethod)),
                         syms.lengthVar);
@@ -508,13 +508,13 @@
             Symbol ordinalMethod = lookupMethod(pos,
                                                 names.ordinal,
                                                 forEnum.type,
-                                                List.<Type>nil());
+                                                List.nil());
             List<JCCatch> catcher = List.<JCCatch>nil()
                 .prepend(make.Catch(make.VarDef(new VarSymbol(PARAMETER, names.ex,
                                                               syms.noSuchFieldErrorType,
                                                               syms.noSymbol),
                                                 null),
-                                    make.Block(0, List.<JCStatement>nil())));
+                                    make.Block(0, List.nil())));
             for (Map.Entry<VarSymbol,Integer> e : values.entrySet()) {
                 VarSymbol enumerator = e.getKey();
                 Integer mappedValue = e.getValue();
@@ -572,7 +572,7 @@
         JCNewClass tree = make.NewClass(null,
             null, make.QualIdent(ctype.tsym), args, null);
         tree.constructor = rs.resolveConstructor(
-            make_pos, attrEnv, ctype, TreeInfo.types(args), List.<Type>nil());
+            make_pos, attrEnv, ctype, TreeInfo.types(args), List.nil());
         tree.type = ctype;
         return tree;
     }
@@ -663,8 +663,8 @@
         // Create class definition tree.
         JCClassDecl cdef = make.ClassDef(
             make.Modifiers(flags), names.empty,
-            List.<JCTypeParameter>nil(),
-            null, List.<JCExpression>nil(), List.<JCTree>nil());
+            List.nil(),
+            null, List.nil(), List.nil());
         cdef.sym = c;
         cdef.type = c.type;
 
@@ -757,7 +757,7 @@
     /** Look up a method in a given scope.
      */
     private MethodSymbol lookupMethod(DiagnosticPosition pos, Name name, Type qual, List<Type> args) {
-        return rs.resolveInternalMethod(pos, attrEnv, qual, name, args, List.<Type>nil());
+        return rs.resolveInternalMethod(pos, attrEnv, qual, name, args, List.nil());
     }
 
     /** Look up a constructor.
@@ -1358,7 +1358,7 @@
         callee.sym = constr;
         callee.type = constr.type;
         md.body =
-            make.Block(0, List.<JCStatement>of(
+            make.Block(0, List.of(
                 make.Call(
                     make.App(
                         callee,
@@ -1613,7 +1613,7 @@
         JCVariableDecl paramTree = make.VarDef(param, null);
         JCStatement assign = make.Assignment(primaryException, make.Ident(param));
         JCStatement rethrowStat = make.Throw(make.Ident(param));
-        JCBlock catchBlock = make.Block(0L, List.<JCStatement>of(assign, rethrowStat));
+        JCBlock catchBlock = make.Block(0L, List.of(assign, rethrowStat));
         JCCatch catchClause = make.Catch(paramTree, catchBlock);
 
         int oldPos = make.pos;
@@ -1622,7 +1622,7 @@
         make.at(oldPos);
         JCTry outerTry = make.Try(makeTwrBlock(resources.tail, block,
                                     finallyCanCompleteNormally, depth + 1),
-                                  List.<JCCatch>of(catchClause),
+                                  List.of(catchClause),
                                   finallyClause);
         outerTry.finallyCanCompleteNormally = finallyCanCompleteNormally;
         stats.add(outerTry);
@@ -1649,14 +1649,14 @@
                 new MethodType(
                     List.of(syms.throwableType, syms.autoCloseableType),
                     syms.voidType,
-                    List.<Type>nil(),
+                    List.nil(),
                     syms.methodClass),
                 currentClass);
             enterSynthetic(resource.pos(), closeResource, currentClass.members());
 
             JCMethodDecl md = make.MethodDef(closeResource, null);
             List<JCVariableDecl> params = md.getParameters();
-            md.body = make.Block(0, List.<JCStatement>of(makeTwrCloseStatement(params.get(0).sym,
+            md.body = make.Block(0, List.of(makeTwrCloseStatement(params.get(0).sym,
                                                                                make.Ident(params.get(1)))));
 
             JCClassDecl currentClassDecl = classDef(currentClass);
@@ -1667,7 +1667,7 @@
 
         if (closeResource != null) {
             //$closeResource(#primaryException, #resource)
-            closeStatement = make.Exec(make.Apply(List.<JCExpression>nil(),
+            closeStatement = make.Exec(make.Apply(List.nil(),
                                                   make.Ident(closeResource),
                                                   List.of(make.Ident(primaryException),
                                                           resource)
@@ -1688,7 +1688,7 @@
         }
 
         return make.Block(0L,
-                          List.<JCStatement>of(finallyStatement));
+                          List.of(finallyStatement));
     }
         //where:
         private boolean shouldUseCloseResourceMethod() {
@@ -1728,14 +1728,14 @@
         JCStatement addSuppressionStatement =
             make.Exec(makeCall(make.Ident(primaryException),
                                names.addSuppressed,
-                               List.<JCExpression>of(make.Ident(catchException))));
+                               List.of(make.Ident(catchException))));
 
         // try { resource.close(); } catch (e) { primaryException.addSuppressed(e); }
         JCBlock tryBlock =
-            make.Block(0L, List.<JCStatement>of(makeResourceCloseInvocation(resource)));
+            make.Block(0L, List.of(makeResourceCloseInvocation(resource)));
         JCVariableDecl catchExceptionDecl = make.VarDef(catchException, null);
-        JCBlock catchBlock = make.Block(0L, List.<JCStatement>of(addSuppressionStatement));
-        List<JCCatch> catchClauses = List.<JCCatch>of(make.Catch(catchExceptionDecl, catchBlock));
+        JCBlock catchBlock = make.Block(0L, List.of(addSuppressionStatement));
+        List<JCCatch> catchClauses = List.of(make.Catch(catchExceptionDecl, catchBlock));
         JCTry tryTree = make.Try(tryBlock, catchClauses, null);
         tryTree.finallyCanCompleteNormally = true;
 
@@ -1756,7 +1756,7 @@
         // create resource.close() method invocation
         JCExpression resourceClose = makeCall(resource,
                                               names.close,
-                                              List.<JCExpression>nil());
+                                              List.nil());
         return make.Exec(resourceClose);
     }
 
@@ -1931,7 +1931,7 @@
                 new MethodType(
                     List.of(syms.stringType),
                     types.erasure(syms.classType),
-                    List.<Type>nil(),
+                    List.nil(),
                     syms.methodClass),
                 outerCacheClass);
             enterSynthetic(pos, classDollarSym, outerCacheClass.members());
@@ -1940,7 +1940,7 @@
             try {
                 md.body = classDollarSymBody(pos, md);
             } catch (CompletionFailure ex) {
-                md.body = make.Block(0, List.<JCStatement>nil());
+                md.body = make.Block(0, List.nil());
                 chk.completionError(pos, ex);
             }
             JCClassDecl outerCacheClassDef = classDef(outerCacheClass);
@@ -1971,7 +1971,7 @@
 
         // newcache := "new cache$1[0]"
         JCNewArray newcache = make.NewArray(make.Type(outerCacheClass.type),
-                                            List.<JCExpression>of(make.Literal(INT, 0).setType(syms.intType)),
+                                            List.of(make.Literal(INT, 0).setType(syms.intType)),
                                             null);
         newcache.type = new ArrayType(types.erasure(outerCacheClass.type),
                                       syms.arrayClass);
@@ -1992,18 +1992,18 @@
                                     makeCall(
                                             makeCall(makeCall(newcache,
                                                               names.getClass,
-                                                              List.<JCExpression>nil()),
+                                                              List.nil()),
                                                      names.getComponentType,
-                                                     List.<JCExpression>nil()),
+                                                     List.nil()),
                                             names.getClassLoader,
-                                            List.<JCExpression>nil())).setType(syms.classLoaderType),
+                                            List.nil())).setType(syms.classLoaderType),
                         make.Ident(clsym)).setType(syms.classLoaderType);
 
         // returnResult := "{ return Class.forName(param1, false, cl$); }"
         List<JCExpression> args = List.of(make.Ident(md.params.head.sym),
                                           makeLit(syms.booleanType, 0),
                                           clvalue);
-        returnResult = make.Block(0, List.<JCStatement>of(make.Call(make.App(make.Ident(forNameSym), args))));
+        returnResult = make.Block(0, List.of(make.Call(make.App(make.Ident(forNameSym), args))));
 
         // catchParam := ClassNotFoundException e1
         VarSymbol catchParam =
@@ -2015,9 +2015,9 @@
         // rethrow = "throw new NoClassDefFoundError().initCause(e);
         JCExpression throwExpr =
             makeCall(makeNewClass(syms.noClassDefFoundErrorType,
-                                  List.<JCExpression>nil()),
+                                  List.nil()),
                      names.initCause,
-                     List.<JCExpression>of(make.Ident(catchParam)));
+                     List.of(make.Ident(catchParam)));
         rethrow = make.Throw(throwExpr);
 
         // rethrowStmt := "( $rethrow )"
@@ -2158,7 +2158,7 @@
             Symbol desiredAssertionStatusSym = lookupMethod(pos,
                                                             names.desiredAssertionStatus,
                                                             types.erasure(syms.classType),
-                                                            List.<Type>nil());
+                                                            List.nil());
             JCClassDecl containerDef = classDef(container);
             make_at(containerDef.pos());
             JCExpression notStatus = makeUnary(NOT, make.App(make.Select(
@@ -2175,7 +2175,7 @@
                 JCClassDecl currentClassDef = classDef(currentClass);
                 make_at(currentClassDef.pos());
                 JCStatement dummy = make.If(make.QualIdent(assertDisabledSym), make.Skip(), null);
-                JCBlock clinit = make.Block(STATIC, List.<JCStatement>of(dummy));
+                JCBlock clinit = make.Block(STATIC, List.of(dummy));
                 currentClassDef.defs = currentClassDef.defs.prepend(clinit);
             }
         }
@@ -2375,15 +2375,15 @@
         ClassSymbol c = msym.module_info;
         c.setAttributes(msym);
         c.flags_field |= Flags.MODULE;
-        createInfoClass(List.<JCAnnotation>nil(), tree.sym.module_info);
+        createInfoClass(List.nil(), tree.sym.module_info);
     }
 
     private void createInfoClass(List<JCAnnotation> annots, ClassSymbol c) {
         long flags = Flags.ABSTRACT | Flags.INTERFACE;
         JCClassDecl infoClass =
                 make.ClassDef(make.Modifiers(flags, annots),
-                    c.name, List.<JCTypeParameter>nil(),
-                    null, List.<JCExpression>nil(), List.<JCTree>nil());
+                    c.name, List.nil(),
+                    null, List.nil(), List.nil());
         infoClass.sym = c;
         translated.append(infoClass);
     }
@@ -2475,7 +2475,7 @@
         currentMethodSym = currentMethodSymPrev;
 
         // Return empty block {} as a placeholder for an inner class.
-        result = make_at(tree.pos()).Block(SYNTHETIC, List.<JCStatement>nil());
+        result = make_at(tree.pos()).Block(SYNTHETIC, List.nil());
     }
 
     /** Translate an enum class. */
@@ -2518,14 +2518,14 @@
                                             arrayType,
                                             tree.type.tsym);
         JCNewArray newArray = make.NewArray(make.Type(types.erasure(tree.type)),
-                                          List.<JCExpression>nil(),
+                                          List.nil(),
                                           values.toList());
         newArray.type = arrayType;
         enumDefs.append(make.VarDef(valuesVar, newArray));
         tree.sym.members().enter(valuesVar);
 
         Symbol valuesSym = lookupMethod(tree.pos(), names.values,
-                                        tree.type, List.<Type>nil());
+                                        tree.type, List.nil());
         List<JCStatement> valuesBody;
         if (useClone()) {
             // return (T[]) $VALUES.clone();
@@ -2533,7 +2533,7 @@
                 make.TypeCast(valuesSym.type.getReturnType(),
                               make.App(make.Select(make.Ident(valuesVar),
                                                    syms.arrayCloneMethod)));
-            valuesBody = List.<JCStatement>of(make.Return(valuesResult));
+            valuesBody = List.of(make.Return(valuesResult));
         } else {
             // template: T[] $result = new T[$values.length];
             Name resultName = names.fromString(target.syntheticNameChar() + "result");
@@ -2554,13 +2554,13 @@
                 systemArraycopyMethod =
                     new MethodSymbol(PUBLIC | STATIC,
                                      names.fromString("arraycopy"),
-                                     new MethodType(List.<Type>of(syms.objectType,
+                                     new MethodType(List.of(syms.objectType,
                                                             syms.intType,
                                                             syms.objectType,
                                                             syms.intType,
                                                             syms.intType),
                                                     syms.voidType,
-                                                    List.<Type>nil(),
+                                                    List.nil(),
                                                     syms.methodClass),
                                      syms.systemType.tsym);
             }
@@ -2573,7 +2573,7 @@
 
             // template: return $result;
             JCStatement ret = make.Return(make.Ident(resultVar));
-            valuesBody = List.<JCStatement>of(decl, copy, ret);
+            valuesBody = List.of(decl, copy, ret);
         }
 
         JCMethodDecl valuesDef =
@@ -2954,7 +2954,7 @@
         if (!tree.cond.type.isTrue()) {
             JCExpression cond = assertFlagTest(tree.pos());
             List<JCExpression> exnArgs = (tree.detail == null) ?
-                List.<JCExpression>nil() : List.of(translate(tree.detail));
+                List.nil() : List.of(translate(tree.detail));
             if (!tree.cond.type.isFalse()) {
                 cond = makeBinary
                     (AND,
@@ -3067,7 +3067,7 @@
                 args = args.tail;
             }
             JCNewArray boxedArgs = make.NewArray(make.Type(varargsElement),
-                                               List.<JCExpression>nil(),
+                                               List.nil(),
                                                elems.toList());
             boxedArgs.type = new ArrayType(varargsElement, syms.arrayClass);
             result.append(boxedArgs);
@@ -3136,7 +3136,7 @@
         Symbol valueSym = lookupMethod(tree.pos(),
                                        unboxedType.tsym.name.append(names.Value), // x.intValue()
                                        tree.type,
-                                       List.<Type>nil());
+                                       List.nil());
         return make.App(make.Select(tree, valueSym));
     }
 
@@ -3485,7 +3485,7 @@
             Symbol iterator = lookupMethod(tree.expr.pos(),
                                            names.iterator,
                                            eType,
-                                           List.<Type>nil());
+                                           List.nil());
             VarSymbol itvar = new VarSymbol(SYNTHETIC, names.fromString("i" + target.syntheticNameChar()),
                                             types.erasure(types.asSuper(iterator.type.getReturnType(), syms.iteratorType.tsym)),
                                             currentMethodSym);
@@ -3497,12 +3497,12 @@
             Symbol hasNext = lookupMethod(tree.expr.pos(),
                                           names.hasNext,
                                           itvar.type,
-                                          List.<Type>nil());
+                                          List.nil());
             JCMethodInvocation cond = make.App(make.Select(make.Ident(itvar), hasNext));
             Symbol next = lookupMethod(tree.expr.pos(),
                                        names.next,
                                        itvar.type,
-                                       List.<Type>nil());
+                                       List.nil());
             JCExpression vardefinit = make.App(make.Select(make.Ident(itvar), next));
             if (tree.var.type.isPrimitive())
                 vardefinit = make.TypeCast(types.cvarUpperBound(iteratorTarget), vardefinit);
@@ -3518,7 +3518,7 @@
             result = translate(make.
                 ForLoop(List.of(init),
                         cond,
-                        List.<JCExpressionStatement>nil(),
+                        List.nil(),
                         body));
             patchTargets(body, tree, result);
         }
@@ -3607,7 +3607,7 @@
         Symbol ordinalMethod = lookupMethod(tree.pos(),
                                             names.ordinal,
                                             tree.selector.type,
-                                            List.<Type>nil());
+                                            List.nil());
         JCArrayAccess selector = make.Indexed(map.mapVar,
                                         make.App(make.Select(tree.selector,
                                                              ordinalMethod)));
@@ -3746,7 +3746,7 @@
             // hashCode will trigger nullcheck on original switch expression
             JCMethodInvocation hashCodeCall = makeCall(make.Ident(dollar_s),
                                                        names.hashCode,
-                                                       List.<JCExpression>nil()).setType(syms.intType);
+                                                       List.nil()).setType(syms.intType);
             JCSwitch switch1 = make.Switch(hashCodeCall,
                                         caseBuffer.toList());
             for(Map.Entry<Integer, Set<String>> entry : hashToString.entrySet()) {
@@ -3758,7 +3758,7 @@
                 for(String caseLabel : stringsWithHashCode ) {
                     JCMethodInvocation stringEqualsCall = makeCall(make.Ident(dollar_s),
                                                                    names.equals,
-                                                                   List.<JCExpression>of(make.Literal(caseLabel)));
+                                                                   List.of(make.Literal(caseLabel)));
                     elsepart = make.If(stringEqualsCall,
                                        make.Exec(make.Assign(make.Ident(dollar_tmp),
                                                              make.Literal(caseLabelToPosition.get(caseLabel))).
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Fri Dec 16 15:27:47 2016 +0000
@@ -2347,7 +2347,7 @@
                   Type site,
                   Name name,
                   boolean qualified) {
-        return accessInternal(sym, pos, location, site, name, qualified, List.<Type>nil(), null, basicLogResolveHelper);
+        return accessInternal(sym, pos, location, site, name, qualified, List.nil(), null, basicLogResolveHelper);
     }
 
     /** Same as original accessBase(), but without location.
@@ -2693,7 +2693,7 @@
                 (sym.flags_field & SYNTHETIC) == 0) {
                     List<Type> oldParams = sym.type.hasTag(FORALL) ?
                             ((ForAll)sym.type).tvars :
-                            List.<Type>nil();
+                            List.nil();
                     Type constrType = new ForAll(site.tsym.type.getTypeArguments().appendList(oldParams),
                                                  types.createMethodTypeWithReturn(sym.type.asMethodType(), site));
                     MethodSymbol newConstr = new MethodSymbol(sym.flags(), names.init, constrType, site.tsym) {
@@ -2721,7 +2721,7 @@
         site = types.capture(site);
 
         ReferenceLookupHelper lookupHelper = makeReferenceLookupHelper(
-                referenceTree, site, name, List.<Type>nil(), null, VARARITY);
+                referenceTree, site, name, List.nil(), null, VARARITY);
 
         Env<AttrContext> newEnv = env.dup(env.tree, env.info.dup());
         Symbol sym = lookupMethod(newEnv, env.tree.pos(), site.tsym,
@@ -3275,7 +3275,7 @@
         protected Symbol lookup(Env<AttrContext> env, MethodResolutionPhase phase) {
             WriteableScope sc = WriteableScope.create(syms.arrayClass);
             MethodSymbol arrayConstr = new MethodSymbol(PUBLIC, name, null, site.tsym);
-            arrayConstr.type = new MethodType(List.<Type>of(syms.intType), site, List.<Type>nil(), syms.methodClass);
+            arrayConstr.type = new MethodType(List.of(syms.intType), site, List.nil(), syms.methodClass);
             sc.enter(arrayConstr);
             return findMethodInScope(env, site, name, argtypes, typeargtypes, sc, methodNotFound, phase.isBoxingRequired(), phase.isVarargsRequired(), false);
         }
@@ -3662,8 +3662,8 @@
                 Name name,
                 List<Type> argtypes,
                 List<Type> typeargtypes) {
-            argtypes = argtypes == null ? List.<Type>nil() : argtypes;
-            typeargtypes = typeargtypes == null ? List.<Type>nil() : typeargtypes;
+            argtypes = argtypes == null ? List.nil() : argtypes;
+            typeargtypes = typeargtypes == null ? List.nil() : typeargtypes;
             if (name == names.error)
                 return null;
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Fri Dec 16 15:27:47 2016 +0000
@@ -529,7 +529,7 @@
         protected  JCExpression enumBase(int pos, ClassSymbol c) {
             JCExpression result = make.at(pos).
                 TypeApply(make.QualIdent(syms.enumSym),
-                          List.<JCExpression>of(make.Type(c.type)));
+                          List.of(make.Type(c.type)));
             return result;
         }
 
@@ -960,9 +960,9 @@
                 MethodDef(make.Modifiers(Flags.PUBLIC|Flags.STATIC),
                           names.values,
                           valuesType,
-                          List.<JCTypeParameter>nil(),
-                          List.<JCVariableDecl>nil(),
-                          List.<JCExpression>nil(), // thrown
+                          List.nil(),
+                          List.nil(),
+                          List.nil(), // thrown
                           null, //make.Block(0, Tree.emptyList.prepend(make.Return(make.Ident(names._null)))),
                           null);
             memberEnter.memberEnter(values, env);
@@ -972,12 +972,12 @@
                 MethodDef(make.Modifiers(Flags.PUBLIC|Flags.STATIC),
                           names.valueOf,
                           make.Type(tree.sym.type),
-                          List.<JCTypeParameter>nil(),
+                          List.nil(),
                           List.of(make.VarDef(make.Modifiers(Flags.PARAMETER |
                                                              Flags.MANDATED),
                                                 names.fromString("name"),
                                                 make.Type(syms.stringType), null)),
-                          List.<JCExpression>nil(), // thrown
+                          List.nil(), // thrown
                           null, //make.Block(0, Tree.emptyList.prepend(make.Return(make.Ident(names._null)))),
                           null);
             memberEnter.memberEnter(valueOf, env);
@@ -1069,7 +1069,7 @@
         }
         if (baseInit != null && baseInit.params != null &&
             baseInit.params.nonEmpty() && argTypesList.nonEmpty()) {
-            initParams = (initParams == null) ? List.<VarSymbol>nil() : initParams;
+            initParams = (initParams == null) ? List.nil() : initParams;
             List<VarSymbol> baseInitParams = baseInit.params;
             while (baseInitParams.nonEmpty() && argTypesList.nonEmpty()) {
                 VarSymbol param = new VarSymbol(baseInitParams.head.flags() | PARAMETER,
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Fri Dec 16 15:27:47 2016 +0000
@@ -779,7 +779,7 @@
                 try {
                     return (outer == Type.noType) ?
                             t.erasure(types) :
-                        new ClassType(outer, List.<Type>nil(), t);
+                        new ClassType(outer, List.nil(), t);
                 } finally {
                     sbp = startSbp;
                 }
@@ -852,7 +852,7 @@
                     t = enterClass(names.fromUtf(signatureBuffer,
                                                  startSbp,
                                                  sbp - startSbp));
-                    outer = new ClassType(outer, List.<Type>nil(), t);
+                    outer = new ClassType(outer, List.nil(), t);
                 }
                 signatureBuffer[sbp++] = (byte)'$';
                 continue;
@@ -2057,9 +2057,9 @@
             // type (typeof null) as return type because this type is
             // a subtype of all reference types and can be converted
             // to primitive types by unboxing.
-            MethodType mt = new MethodType(List.<Type>nil(),
+            MethodType mt = new MethodType(List.nil(),
                                            syms.botType,
-                                           List.<Type>nil(),
+                                           List.nil(),
                                            syms.methodClass);
             return new MethodSymbol(PUBLIC | ABSTRACT, name, mt, container.tsym);
         }
@@ -2263,7 +2263,7 @@
 
         TypeAnnotationCompleter(Symbol sym,
                 List<TypeAnnotationProxy> proxies) {
-            super(sym, List.<CompoundAnnotationProxy>nil());
+            super(sym, List.nil());
             this.proxies = proxies;
         }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Fri Dec 16 15:27:47 2016 +0000
@@ -476,8 +476,8 @@
                 STATIC | (c.flags() & STRICTFP),
                 names.clinit,
                 new MethodType(
-                    List.<Type>nil(), syms.voidType,
-                    List.<Type>nil(), syms.methodClass),
+                    List.nil(), syms.voidType,
+                    List.nil(), syms.methodClass),
                 c);
             c.members().enter(clinit);
             List<JCStatement> clinitStats = clinitCode.toList();
@@ -1037,11 +1037,11 @@
     }
 
     public void visitDoLoop(JCDoWhileLoop tree) {
-        genLoop(tree, tree.body, tree.cond, List.<JCExpressionStatement>nil(), false);
+        genLoop(tree, tree.body, tree.cond, List.nil(), false);
     }
 
     public void visitWhileLoop(JCWhileLoop tree) {
-        genLoop(tree, tree.body, tree.cond, List.<JCExpressionStatement>nil(), true);
+        genLoop(tree, tree.body, tree.cond, List.nil(), true);
     }
 
     public void visitForLoop(JCForLoop tree) {
@@ -1321,7 +1321,7 @@
             }
         };
         syncEnv.info.gaps = new ListBuffer<>();
-        genTry(tree.body, List.<JCCatch>nil(), syncEnv);
+        genTry(tree.body, List.nil(), syncEnv);
         code.endScopes(limit);
     }
 
@@ -1903,7 +1903,7 @@
                     List.of(syms.objectType), true);
         } else {
             callMethod(pos, syms.objectType, names.getClass,
-                    List.<Type>nil(), false);
+                    List.nil(), false);
         }
         code.emitop0(pop);
     }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java	Fri Dec 16 15:27:47 2016 +0000
@@ -224,7 +224,7 @@
             JCDiagnostic.DiagnosticPosition pos = tree.pos();
             gen.getCode().emitop2(new_, gen.makeRef(pos, syms.stringBuilderType));
             gen.getCode().emitop0(dup);
-            gen.callMethod(pos, syms.stringBuilderType, names.init, List.<Type>nil(), false);
+            gen.callMethod(pos, syms.stringBuilderType, names.init, List.nil(), false);
             return pos;
         }
 
@@ -245,7 +245,7 @@
         }
 
         private void builderToString(JCDiagnostic.DiagnosticPosition pos) {
-            gen.callMethod(pos, syms.stringBuilderType, names.toString, List.<Type>nil(), false);
+            gen.callMethod(pos, syms.stringBuilderType, names.toString, List.nil(), false);
         }
     }
 
@@ -353,7 +353,7 @@
         private void doCall(Type type, JCDiagnostic.DiagnosticPosition pos, List<Type> dynamicArgTypes) {
             Type.MethodType indyType = new Type.MethodType(dynamicArgTypes,
                     type,
-                    List.<Type>nil(),
+                    List.nil(),
                     syms.methodClass);
 
             int prevPos = make.pos;
@@ -457,7 +457,7 @@
         private void doCall(Type type, JCDiagnostic.DiagnosticPosition pos, String recipe, List<Object> staticArgs, List<Type> dynamicArgTypes) {
             Type.MethodType indyType = new Type.MethodType(dynamicArgTypes,
                     type,
-                    List.<Type>nil(),
+                    List.nil(),
                     syms.methodClass);
 
             int prevPos = make.pos;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Fri Dec 16 15:27:47 2016 +0000
@@ -583,7 +583,7 @@
     }
 
     protected final <T> List<T> stopIfError(CompileState cs, List<T> list) {
-        return shouldStop(cs) ? List.<T>nil() : list;
+        return shouldStop(cs) ? List.nil() : list;
     }
 
     /** The number of warnings reported so far.
@@ -612,7 +612,7 @@
      */
     protected JCCompilationUnit parse(JavaFileObject filename, CharSequence content) {
         long msec = now();
-        JCCompilationUnit tree = make.TopLevel(List.<JCTree>nil());
+        JCCompilationUnit tree = make.TopLevel(List.nil());
         if (content != null) {
             if (verbose) {
                 log.printVerbose("parsing.started", filename);
@@ -725,7 +725,7 @@
                                       : make.Select(tree, names.fromString(s));
             }
             JCCompilationUnit toplevel =
-                make.TopLevel(List.<JCTree>nil());
+                make.TopLevel(List.nil());
             toplevel.modle = msym;
             toplevel.packge = msym.unnamedPackage;
             return attr.attribIdent(tree, toplevel);
@@ -792,7 +792,7 @@
             return t;
         } catch (IOException e) {
             log.error("error.reading.file", filename, JavacFileManager.getMessage(e));
-            return make.TopLevel(List.<JCTree>nil());
+            return make.TopLevel(List.nil());
         } finally {
             log.useSource(prev);
         }
@@ -886,7 +886,7 @@
 
     public void compile(List<JavaFileObject> sourceFileObject)
         throws Throwable {
-        compile(sourceFileObject, List.<String>nil(), null);
+        compile(sourceFileObject, List.nil(), null);
     }
 
     /**
@@ -1149,7 +1149,7 @@
 
     // TODO: called by JavacTaskImpl
     public void processAnnotations(List<JCCompilationUnit> roots) {
-        processAnnotations(roots, List.<String>nil());
+        processAnnotations(roots, List.nil());
     }
 
     /**
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java	Fri Dec 16 15:27:47 2016 +0000
@@ -683,7 +683,7 @@
             }
         }
 
-        return List.<DCTree>of(erroneous("dc.unterminated.inline.tag", pos));
+        return List.of(erroneous("dc.unterminated.inline.tag", pos));
     }
 
     protected void entity(ListBuffer<DCTree> list) {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Fri Dec 16 15:27:47 2016 +0000
@@ -418,7 +418,7 @@
     }
 
     protected JCErroneous syntaxError(int pos, String key, TokenKind... args) {
-        return syntaxError(pos, List.<JCTree>nil(), key, args);
+        return syntaxError(pos, List.nil(), key, args);
     }
 
     protected JCErroneous syntaxError(int pos, List<JCTree> errs, String key, TokenKind... args) {
@@ -1882,7 +1882,7 @@
                 return args.toList();
             }
         } else {
-            return List.<JCExpression>of(syntaxError(token.pos, "expected", LT));
+            return List.of(syntaxError(token.pos, "expected", LT));
         }
     }
 
@@ -1967,7 +1967,7 @@
     /** BracketsOpt = [ "[" "]" { [Annotations] "[" "]"} ]
      */
     private JCExpression bracketsOpt(JCExpression t) {
-        return bracketsOpt(t, List.<JCAnnotation>nil());
+        return bracketsOpt(t, List.nil());
     }
 
     private JCExpression bracketsOptCont(JCExpression t, int pos,
@@ -2147,7 +2147,7 @@
         } else {
             setErrorEndPos(token.pos);
             reportSyntaxError(token.pos, "expected2", LPAREN, LBRACKET);
-            t = toP(F.at(newpos).NewClass(null, typeArgs, t, List.<JCExpression>nil(), null));
+            t = toP(F.at(newpos).NewClass(null, typeArgs, t, List.nil(), null));
             return toP(F.at(newpos).Erroneous(List.<JCTree>of(t)));
         }
     }
@@ -2197,8 +2197,8 @@
                 }
                 return na;
             } else {
-                JCExpression t = toP(F.at(newpos).NewArray(elemtype, List.<JCExpression>nil(), null));
-                return syntaxError(token.pos, List.<JCTree>of(t), "array.dimension.missing");
+                JCExpression t = toP(F.at(newpos).NewArray(elemtype, List.nil(), null));
+                return syntaxError(token.pos, List.of(t), "array.dimension.missing");
             }
         } else {
             ListBuffer<JCExpression> dims = new ListBuffer<>();
@@ -2267,7 +2267,7 @@
             }
         }
         accept(RBRACE);
-        return toP(F.at(newpos).NewArray(t, List.<JCExpression>nil(), elems.toList()));
+        return toP(F.at(newpos).NewArray(t, List.nil(), elems.toList()));
     }
 
     /** VariableInitializer = ArrayInitializer | Expression
@@ -2420,7 +2420,7 @@
             if (token.kind == COLON && t.hasTag(IDENT)) {
                 nextToken();
                 JCStatement stat = parseStatementAsBlock();
-                return List.<JCStatement>of(F.at(pos).Labelled(prevToken.name(), stat));
+                return List.of(F.at(pos).Labelled(prevToken.name(), stat));
             } else if ((lastmode & TYPE) != 0 && LAX_IDENTIFIER.accepts(token.kind)) {
                 pos = token.pos;
                 JCModifiers mods = F.at(Position.NOPOS).Modifiers(0);
@@ -2436,7 +2436,7 @@
                 t = checkExprStat(t);
                 accept(SEMI);
                 JCExpressionStatement expr = toP(F.at(pos).Exec(t));
-                return List.<JCStatement>of(expr);
+                return List.of(expr);
             }
         }
     }
@@ -2478,7 +2478,7 @@
         case FOR: {
             nextToken();
             accept(LPAREN);
-            List<JCStatement> inits = token.kind == SEMI ? List.<JCStatement>nil() : forInit();
+            List<JCStatement> inits = token.kind == SEMI ? List.nil() : forInit();
             if (inits.length() == 1 &&
                 inits.head.hasTag(VARDEF) &&
                 ((JCVariableDecl) inits.head).init == null &&
@@ -2493,7 +2493,7 @@
                 accept(SEMI);
                 JCExpression cond = token.kind == SEMI ? null : parseExpression();
                 accept(SEMI);
-                List<JCExpressionStatement> steps = token.kind == RPAREN ? List.<JCExpressionStatement>nil() : forUpdate();
+                List<JCExpressionStatement> steps = token.kind == RPAREN ? List.nil() : forUpdate();
                 accept(RPAREN);
                 JCStatement body = parseStatementAsBlock();
                 return F.at(pos).ForLoop(inits, cond, steps, body);
@@ -2516,7 +2516,7 @@
         }
         case TRY: {
             nextToken();
-            List<JCTree> resources = List.<JCTree>nil();
+            List<JCTree> resources = List.nil();
             if (token.kind == LPAREN) {
                 checkTryWithResources();
                 nextToken();
@@ -2626,7 +2626,7 @@
         int errPos = S.errPos();
         JCTree stm = action.doRecover(this);
         S.errPos(errPos);
-        return toP(F.Exec(syntaxError(startPos, List.<JCTree>of(stm), key)));
+        return toP(F.Exec(syntaxError(startPos, List.of(stm), key)));
     }
 
     /** CatchClause     = CATCH "(" FormalParameter ")" Block
@@ -2882,7 +2882,7 @@
     }
 
     List<JCExpression> annotationFieldValuesOpt() {
-        return (token.kind == LPAREN) ? annotationFieldValues() : List.<JCExpression>nil();
+        return (token.kind == LPAREN) ? annotationFieldValues() : List.nil();
     }
 
     /** AnnotationFieldValues   = "(" [ AnnotationFieldValue { "," AnnotationFieldValue } ] ")" */
@@ -2945,7 +2945,7 @@
                 }
             }
             accept(RBRACE);
-            return toP(F.at(pos).NewArray(null, List.<JCExpression>nil(), buf.toList()));
+            return toP(F.at(pos).NewArray(null, List.nil(), buf.toList()));
         default:
             mode = EXPR;
             return term1();
@@ -3342,10 +3342,10 @@
             int pos = token.pos;
             List<JCTree> errs;
             if (LAX_IDENTIFIER.accepts(token.kind)) {
-                errs = List.<JCTree>of(mods, toP(F.at(pos).Ident(ident())));
+                errs = List.of(mods, toP(F.at(pos).Ident(ident())));
                 setErrorEndPos(token.pos);
             } else {
-                errs = List.<JCTree>of(mods);
+                errs = List.of(mods);
             }
             return toP(F.Exec(syntaxError(pos, errs, "expected3",
                                           CLASS, INTERFACE, ENUM)));
@@ -3423,7 +3423,7 @@
         List<JCTree> defs = enumBody(name);
         mods.flags |= Flags.ENUM;
         JCClassDecl result = toP(F.at(pos).
-            ClassDef(mods, name, List.<JCTypeParameter>nil(),
+            ClassDef(mods, name, List.nil(),
                      null, implementing, defs));
         attach(result, dc);
         return result;
@@ -3481,7 +3481,7 @@
         Name name = ident();
         int createPos = token.pos;
         List<JCExpression> args = (token.kind == LPAREN)
-            ? arguments() : List.<JCExpression>nil();
+            ? arguments() : List.nil();
         JCClassDecl body = null;
         if (token.kind == LBRACE) {
             JCModifiers mods1 = F.at(Position.NOPOS).Modifiers(Flags.ENUM);
@@ -3567,7 +3567,7 @@
     protected List<JCTree> classOrInterfaceBodyDeclaration(Name className, boolean isInterface) {
         if (token.kind == SEMI) {
             nextToken();
-            return List.<JCTree>nil();
+            return List.nil();
         } else {
             Comment dc = token.comment(CommentStyle.JAVADOC);
             int pos = token.pos;
@@ -3575,14 +3575,14 @@
             if (token.kind == CLASS ||
                 token.kind == INTERFACE ||
                 token.kind == ENUM) {
-                return List.<JCTree>of(classOrInterfaceOrEnumDeclaration(mods, dc));
+                return List.of(classOrInterfaceOrEnumDeclaration(mods, dc));
             } else if (token.kind == LBRACE &&
                        (mods.flags & Flags.StandardFlags & ~Flags.STATIC) == 0 &&
                        mods.annotations.isEmpty()) {
                 if (isInterface) {
                     error(token.pos, "initializer.not.allowed");
                 }
-                return List.<JCTree>of(block(pos, mods.flags));
+                return List.of(block(pos, mods.flags));
             } else {
                 pos = token.pos;
                 List<JCTypeParameter> typarams = typeParametersOpt();
@@ -3637,10 +3637,10 @@
                     } else {
                         pos = token.pos;
                         List<JCTree> err = isVoid
-                            ? List.<JCTree>of(toP(F.at(pos).MethodDef(mods, name, type, typarams,
-                                List.<JCVariableDecl>nil(), List.<JCExpression>nil(), null, null)))
+                            ? List.of(toP(F.at(pos).MethodDef(mods, name, type, typarams,
+                                List.nil(), List.nil(), null, null)))
                             : null;
-                        return List.<JCTree>of(syntaxError(token.pos, err, "expected", LPAREN));
+                        return List.of(syntaxError(token.pos, err, "expected", LPAREN));
                     }
                 }
             }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Fri Dec 16 15:27:47 2016 +0000
@@ -1226,8 +1226,8 @@
         /** Print info about this round. */
         private void printRoundInfo(boolean lastRound) {
             if (printRounds || verbose) {
-                List<ClassSymbol> tlc = lastRound ? List.<ClassSymbol>nil() : topLevelClasses;
-                Set<TypeElement> ap = lastRound ? Collections.<TypeElement>emptySet() : annotationsPresent;
+                List<ClassSymbol> tlc = lastRound ? List.nil() : topLevelClasses;
+                Set<TypeElement> ap = lastRound ? Collections.emptySet() : annotationsPresent;
                 log.printLines("x.print.rounds",
                         number,
                         "{" + tlc.toString(", ") + "}",
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java	Fri Dec 16 15:27:47 2016 +0000
@@ -551,7 +551,7 @@
         @DefinedBy(Api.COMPILER_TREE)
         public List<JCAnnotation> getPackageAnnotations() {
             JCPackageDecl pd = getPackage();
-            return pd != null ? pd.getAnnotations() : List.<JCAnnotation>nil();
+            return pd != null ? pd.getAnnotations() : List.nil();
         }
         @DefinedBy(Api.COMPILER_TREE)
         public ExpressionTree getPackageName() {
@@ -1619,7 +1619,7 @@
                         JCExpression meth,
                         List<JCExpression> args)
         {
-            this.typeargs = (typeargs == null) ? List.<JCExpression>nil()
+            this.typeargs = (typeargs == null) ? List.nil()
                                                : typeargs;
             this.meth = meth;
             this.args = args;
@@ -1673,7 +1673,7 @@
                            JCClassDecl def)
         {
             this.encl = encl;
-            this.typeargs = (typeargs == null) ? List.<JCExpression>nil()
+            this.typeargs = (typeargs == null) ? List.nil()
                                                : typeargs;
             this.clazz = clazz;
             this.args = args;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Fri Dec 16 15:27:47 2016 +0000
@@ -285,7 +285,7 @@
     }
 
     public JCTry Try(JCBlock body, List<JCCatch> catchers, JCBlock finalizer) {
-        return Try(List.<JCTree>nil(), body, catchers, finalizer);
+        return Try(List.nil(), body, catchers, finalizer);
     }
 
     public JCTry Try(List<JCTree> resources,
@@ -495,7 +495,7 @@
     }
 
     public JCTypeParameter TypeParameter(Name name, List<JCExpression> bounds) {
-        return TypeParameter(name, bounds, List.<JCAnnotation>nil());
+        return TypeParameter(name, bounds, List.nil());
     }
 
     public JCTypeParameter TypeParameter(Name name, List<JCExpression> bounds, List<JCAnnotation> annos) {
@@ -536,7 +536,7 @@
     }
 
     public JCModifiers Modifiers(long flags) {
-        return Modifiers(flags, List.<JCAnnotation>nil());
+        return Modifiers(flags, List.nil());
     }
 
     @Override
@@ -589,7 +589,7 @@
     }
 
     public JCErroneous Erroneous() {
-        return Erroneous(List.<JCTree>nil());
+        return Erroneous(List.nil());
     }
 
     public JCErroneous Erroneous(List<? extends JCTree> errs) {
@@ -613,9 +613,9 @@
     {
         return ClassDef(mods,
                         names.empty,
-                        List.<JCTypeParameter>nil(),
+                        List.nil(),
                         null,
-                        List.<JCExpression>nil(),
+                        List.nil(),
                         defs);
     }
 
@@ -714,7 +714,7 @@
      * Create a no-arg method invocation from a method tree
      */
     public JCMethodInvocation App(JCExpression meth) {
-        return Apply(null, meth, List.<JCExpression>nil()).setType(meth.type.getReturnType());
+        return Apply(null, meth, List.nil()).setType(meth.type.getReturnType());
     }
 
     /** Create a method invocation from a method tree and a list of argument trees.
@@ -903,7 +903,7 @@
             ListBuffer<JCExpression> elems = new ListBuffer<>();
             for (int i = 0; i < array.values.length; i++)
                 elems.append(translate(array.values[i]));
-            result = NewArray(null, List.<JCExpression>nil(), elems.toList()).setType(array.type);
+            result = NewArray(null, List.nil(), elems.toList()).setType(array.type);
         }
         JCExpression translate(Attribute a) {
             a.accept(this);
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Context.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Context.java	Fri Dec 16 15:27:47 2016 +0000
@@ -158,7 +158,7 @@
          * Since we found a key of type Key<T>, the value must
          * be of type T.
          */
-        return Context.<T>uncheckedCast(o);
+        return Context.uncheckedCast(o);
     }
 
     public Context() {}
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/List.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/List.java	Fri Dec 16 15:27:47 2016 +0000
@@ -134,7 +134,7 @@
     /** Construct a list consisting of given element.
      */
     public static <A> List<A> of(A x1) {
-        return new List<>(x1, List.<A>nil());
+        return new List<>(x1, List.nil());
     }
 
     /** Construct a list consisting of given elements.
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/ListBuffer.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/ListBuffer.java	Fri Dec 16 15:27:47 2016 +0000
@@ -103,10 +103,10 @@
         if (elems.nonEmpty()) {
             List<A> orig = elems;
 
-            elems = last = List.<A>of(orig.head);
+            elems = last = List.of(orig.head);
 
             while ((orig = orig.tail).nonEmpty()) {
-                last.tail = List.<A>of(orig.head);
+                last.tail = List.of(orig.head);
                 last = last.tail;
             }
         }
@@ -126,7 +126,7 @@
     public ListBuffer<A> append(A x) {
         Assert.checkNonNull(x);
         if (shared) copy();
-        List<A> newLast = List.<A>of(x);
+        List<A> newLast = List.of(x);
         if (last != null) {
             last.tail = newLast;
             last = newLast;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java	Fri Dec 16 15:27:47 2016 +0000
@@ -556,7 +556,7 @@
                 List<Type> bounds = (bound != null) &&
                         (bound.hasTag(CLASS) || bound.hasTag(TYPEVAR)) ?
                     types.getBounds(t) :
-                    List.<Type>nil();
+                    List.nil();
 
                 nameSimplifier.addUsage(t.tsym);
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/CompileJavaPackages.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/CompileJavaPackages.java	Fri Dec 16 15:27:47 2016 +0000
@@ -222,7 +222,7 @@
                 CompilationSubResult result = sjavac.compile("n/a",
                                                              chunkId,
                                                              args.prepJavacArgs(),
-                                                             Collections.<File>emptyList(),
+                                                             Collections.emptyList(),
                                                              cc.srcs,
                                                              visibleSources);
                 synchronized (lock) {
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBuilder.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBuilder.java	Fri Dec 16 15:27:47 2016 +0000
@@ -37,7 +37,7 @@
  */
 @Deprecated
 public class ContentBuilder extends Content {
-    protected List<Content> contents = Collections.<Content>emptyList();
+    protected List<Content> contents = Collections.emptyList();
 
     @Override
     public void addContent(Content content) {
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocument.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocument.java	Fri Dec 16 15:27:47 2016 +0000
@@ -45,7 +45,7 @@
 @Deprecated
 public class HtmlDocument extends Content {
 
-    private List<Content> docContent = Collections.<Content>emptyList();
+    private List<Content> docContent = Collections.emptyList();
 
     /**
      * Constructor to construct an HTML document.
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Fri Dec 16 15:27:47 2016 +0000
@@ -48,8 +48,8 @@
 public class HtmlTree extends Content {
 
     private HtmlTag htmlTag;
-    private Map<HtmlAttr,String> attrs = Collections.<HtmlAttr,String>emptyMap();
-    private List<Content> content = Collections.<Content>emptyList();
+    private Map<HtmlAttr,String> attrs = Collections.emptyMap();
+    private List<Content> content = Collections.emptyList();
     public static final Content EMPTY = new StringContent("");
 
     /**
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/Start.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/Start.java	Fri Dec 16 15:27:47 2016 +0000
@@ -221,7 +221,7 @@
      * Main program - external wrapper
      */
     public int begin(String... argv) {
-        boolean ok = begin(null, argv, Collections.<JavaFileObject> emptySet());
+        boolean ok = begin(null, argv, Collections.emptySet());
         return ok ? 0 : 1;
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/WildcardTypeImpl.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/WildcardTypeImpl.java	Fri Dec 16 15:27:47 2016 +0000
@@ -128,13 +128,13 @@
 
     private static List<Type> getExtendsBounds(Type.WildcardType wild) {
         return wild.isSuperBound()
-                ? List.<Type>nil()
+                ? List.nil()
                 : List.of(wild.type);
     }
 
     private static List<Type> getSuperBounds(Type.WildcardType wild) {
         return wild.isExtendsBound()
-                ? List.<Type>nil()
+                ? List.nil()
                 : List.of(wild.type);
     }
 }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java	Fri Dec 16 15:27:47 2016 +0000
@@ -59,9 +59,9 @@
         this.context = context;
         this.docletClass = docletClass;
 
-        this.options = (options == null) ? Collections.<String>emptySet()
+        this.options = (options == null) ? Collections.emptySet()
                 : nullCheck(options);
-        this.fileObjects = (fileObjects == null) ? Collections.<JavaFileObject>emptySet()
+        this.fileObjects = (fileObjects == null) ? Collections.emptySet()
                 : nullCheck(fileObjects);
         setLocale(Locale.getDefault());
     }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/ContentBuilder.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/ContentBuilder.java	Fri Dec 16 15:27:47 2016 +0000
@@ -37,7 +37,7 @@
  * A sequence of Content nodes.
  */
 public class ContentBuilder extends Content {
-    protected List<Content> contents = Collections.<Content>emptyList();
+    protected List<Content> contents = Collections.emptyList();
 
     @Override
     public void addContent(Content content) {
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlDocument.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlDocument.java	Fri Dec 16 15:27:47 2016 +0000
@@ -43,7 +43,7 @@
  */
 public class HtmlDocument extends Content {
 
-    private List<Content> docContent = Collections.<Content>emptyList();
+    private List<Content> docContent = Collections.emptyList();
 
     /**
      * Constructor to construct an HTML document.
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java	Fri Dec 16 15:27:47 2016 +0000
@@ -53,8 +53,8 @@
 public class HtmlTree extends Content {
 
     private HtmlTag htmlTag;
-    private Map<HtmlAttr,String> attrs = Collections.<HtmlAttr,String>emptyMap();
-    private List<Content> content = Collections.<Content>emptyList();
+    private Map<HtmlAttr,String> attrs = Collections.emptyMap();
+    private List<Content> content = Collections.emptyList();
     public static final Content EMPTY = new StringContent("");
 
     /**
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java	Fri Dec 16 15:27:47 2016 +0000
@@ -338,7 +338,7 @@
                     nargv);
             return (rc == 0) ? OK : ERROR;
         }
-        return begin(Arrays.asList(argv), Collections.<JavaFileObject> emptySet());
+        return begin(Arrays.asList(argv), Collections.emptySet());
     }
 
     // Called by 199 API.
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Corraller.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Corraller.java	Fri Dec 16 15:27:47 2016 +0000
@@ -149,8 +149,7 @@
             }
             JCNewClass exp = make.NewClass(null,
                     null, expClass, List.of(make.Literal(keyIndex)), null);
-            resolutionExceptionBlock = make.Block(0L, List.<JCStatement>of(
-                    make.Throw(exp)));
+            resolutionExceptionBlock = make.Block(0L, List.of(make.Throw(exp)));
         }
         return resolutionExceptionBlock;
     }
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ReplParser.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ReplParser.java	Fri Dec 16 15:27:47 2016 +0000
@@ -235,8 +235,8 @@
                             // malformed declaration, return error
                             pos = token.pos;
                             List<JCTree> err = isVoid
-                                    ? List.<JCTree>of(toP(F.at(pos).MethodDef(mods, name, t, typarams,
-                                                            List.<JCVariableDecl>nil(), List.<JCExpression>nil(), null, null)))
+                                    ? List.of(toP(F.at(pos).MethodDef(mods, name, t, typarams,
+                                                            List.nil(), List.nil(), null, null)))
                                     : null;
                             return List.<JCTree>of(syntaxError(token.pos, err, "expected", LPAREN));
                         }
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java	Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java	Fri Dec 16 15:27:47 2016 +0000
@@ -1119,7 +1119,7 @@
         }
 
         if (guessKind(code) == Kind.IMPORT)
-            return Collections.<Documentation>emptyList();
+            return Collections.emptyList();
 
         OuterWrap codeWrap = proc.outerMap.wrapInTrialClass(Wrap.methodWrap(code));
         AnalyzeTask at = proc.taskFactory.new AnalyzeTask(codeWrap, keepParameterNames);
@@ -1128,7 +1128,7 @@
         TreePath tp = pathFor(topLevel, sp, codeWrap.snippetIndexToWrapIndex(cursor));
 
         if (tp == null)
-            return Collections.<Documentation>emptyList();
+            return Collections.emptyList();
 
         TreePath prevPath = null;
         while (tp != null && tp.getLeaf().getKind() != Kind.METHOD_INVOCATION &&
@@ -1139,7 +1139,7 @@
         }
 
         if (tp == null)
-            return Collections.<Documentation>emptyList();
+            return Collections.emptyList();
 
         Stream<Element> elements;
         Iterable<Pair<ExecutableElement, ExecutableType>> candidates;
@@ -1175,12 +1175,12 @@
                 el.asType().getKind() == TypeKind.ERROR ||
                 (el.getKind() == ElementKind.PACKAGE && el.getEnclosedElements().isEmpty())) {
                 //erroneous element:
-                return Collections.<Documentation>emptyList();
+                return Collections.emptyList();
             }
 
             elements = Stream.of(el);
         } else {
-            return Collections.<Documentation>emptyList();
+            return Collections.emptyList();
         }
 
         List<Documentation> result = Collections.emptyList();