langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java
changeset 28594 f462f1662741
parent 28459 48a68a485760
child 29051 7244db2ab176
equal deleted inserted replaced
28593:d8bb77bbb041 28594:f462f1662741
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   896         }
   896         }
   897         if (useVarargs) {
   897         if (useVarargs) {
   898             Type argtype = owntype.getParameterTypes().last();
   898             Type argtype = owntype.getParameterTypes().last();
   899             if (!types.isReifiable(argtype) &&
   899             if (!types.isReifiable(argtype) &&
   900                 (!allowSimplifiedVarargs ||
   900                 (!allowSimplifiedVarargs ||
   901                  sym.attribute(syms.trustMeType.tsym) == null ||
   901                  sym.baseSymbol().attribute(syms.trustMeType.tsym) == null ||
   902                  !isTrustMeAllowedOnMethod(sym))) {
   902                  !isTrustMeAllowedOnMethod(sym))) {
   903                 warnUnchecked(env.tree.pos(),
   903                 warnUnchecked(env.tree.pos(),
   904                                   "unchecked.generic.array.creation",
   904                                   "unchecked.generic.array.creation",
   905                                   argtype);
   905                                   argtype);
   906             }
   906             }