2
* Copyright (c) 2021, Google LLC. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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
7
* published by the Free Software Foundation.
9
* This code is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
* version 2 for more details (a copy is included in the LICENSE file that
13
* accompanied this code).
15
* You should have received a copy of the GNU General Public License version
16
* 2 along with this work; if not, write to the Free Software Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
25
* Test input for the fix for JDK-8174954, which checks for an expected
26
* IllegalAccessError when the parameter type of an invokedynamic is
29
* The test assumes that given the string concatenation expression "" + param,
30
* javac generates an invokedynamic that uses the specific type of param. The
31
* fix for JDK-8273914 make javac eagerly convert param to a String before
32
* passing it to the invokedynamic call, which avoids the accessibility issue
33
* the test is trying to exercise.
35
* This jasm file contains the bytecode javac generated before the fix for
36
* JDK-8273914, to continue to exercise the invokedynamic behaviour that
37
* JDK-8174954 is testing.
45
public Method "<init>":"()V"
49
invokespecial Method java/lang/Object."<init>":"()V";
52
public Method method5:"(Lp2/c2;)V"
55
getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
57
invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/invoke/StringConcatFactory.makeConcatWithConstants:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;":makeConcatWithConstants:"(Lp2/c2;)Ljava/lang/String;" {
58
String "In c5\'s method5 with param = "
60
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
63
public Method methodAddReadEdge:"(Ljava/lang/Module;)V"
67
invokevirtual Method java/lang/Class.getModule:"()Ljava/lang/Module;";
69
invokevirtual Method java/lang/Module.addReads:"(Ljava/lang/Module;)Ljava/lang/Module;";
74
public static final InnerClass Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles;