src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java
changeset 51047 860a3648c494
parent 50539 7bf4f1b5e438
child 52777 7d3391e9df19
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Thu Jul 12 12:06:22 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Thu Jul 12 14:13:15 2018 -0700
@@ -236,7 +236,7 @@
      *  @param pos        Position to be used for error reporting.
      */
     void warnUnsafeVararg(DiagnosticPosition pos, Warning warnKey) {
-        if (lint.isEnabled(LintCategory.VARARGS) && Feature.SIMPLIFIED_VARARGS.allowedInSource(source))
+        if (lint.isEnabled(LintCategory.VARARGS))
             log.warning(LintCategory.VARARGS, pos, warnKey);
     }
 
@@ -886,7 +886,6 @@
 
     void checkVarargsMethodDecl(Env<AttrContext> env, JCMethodDecl tree) {
         MethodSymbol m = tree.sym;
-        if (!Feature.SIMPLIFIED_VARARGS.allowedInSource(source)) return;
         boolean hasTrustMeAnno = m.attribute(syms.trustMeType.tsym) != null;
         Type varargElemType = null;
         if (m.isVarArgs()) {
@@ -998,16 +997,12 @@
         if (useVarargs) {
             Type argtype = owntype.getParameterTypes().last();
             if (!types.isReifiable(argtype) &&
-                (!Feature.SIMPLIFIED_VARARGS.allowedInSource(source) ||
-                 sym.baseSymbol().attribute(syms.trustMeType.tsym) == null ||
+                (sym.baseSymbol().attribute(syms.trustMeType.tsym) == null ||
                  !isTrustMeAllowedOnMethod(sym))) {
                 warnUnchecked(env.tree.pos(), Warnings.UncheckedGenericArrayCreation(argtype));
             }
             TreeInfo.setVarargsElement(env.tree, types.elemtype(argtype));
          }
-         if ((sym.flags() & SIGNATURE_POLYMORPHIC) != 0 && !target.hasMethodHandles()) {
-            log.error(env.tree, Errors.BadTargetSigpolyCall(target, Target.JDK1_7));
-         }
          return owntype;
     }
     //where