Fri, 20 Jan 2017 16:23:01 +0000
Merge
1.1 --- a/src/share/classes/com/sun/tools/javac/code/Types.java Thu Dec 22 16:21:25 2016 -0800 1.2 +++ b/src/share/classes/com/sun/tools/javac/code/Types.java Fri Jan 20 16:23:01 2017 +0000 1.3 @@ -1067,7 +1067,7 @@ 1.4 List<Type> argtypes = msym.type.getParameterTypes(); 1.5 return (msym.flags_field & NATIVE) != 0 && 1.6 msym.owner == syms.methodHandleType.tsym && 1.7 - argtypes.tail.tail == null && 1.8 + argtypes.length() == 1 && 1.9 argtypes.head.hasTag(TypeTag.ARRAY) && 1.10 msym.type.getReturnType().tsym == syms.objectType.tsym && 1.11 ((ArrayType)argtypes.head).elemtype.tsym == syms.objectType.tsym;
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/test/tools/javac/meth/BadPolySig.java Fri Jan 20 16:23:01 2017 +0000 2.3 @@ -0,0 +1,37 @@ 2.4 +/* 2.5 + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. 2.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.7 + * 2.8 + * This code is free software; you can redistribute it and/or modify it 2.9 + * under the terms of the GNU General Public License version 2 only, as 2.10 + * published by the Free Software Foundation. Oracle designates this 2.11 + * particular file as subject to the "Classpath" exception as provided 2.12 + * by Oracle in the LICENSE file that accompanied this code. 2.13 + * 2.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 2.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2.17 + * version 2 for more details (a copy is included in the LICENSE file that 2.18 + * accompanied this code). 2.19 + * 2.20 + * You should have received a copy of the GNU General Public License version 2.21 + * 2 along with this work; if not, write to the Free Software Foundation, 2.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2.23 + * 2.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2.25 + * or visit www.oracle.com if you need additional information or have any 2.26 + * questions. 2.27 + */ 2.28 + 2.29 +/* 2.30 + * @test 2.31 + * @bug 8168774 2.32 + * @summary Polymorhic signature method check crashes javac 2.33 + * @compile BadPolySig.java 2.34 + */ 2.35 + 2.36 +package java.lang.invoke; 2.37 + 2.38 +class MethodHandle { 2.39 + native Object m(); 2.40 +}