8 *
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).
14 *
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.
18 *
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
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8087223
27 * @summary Adding constantTag to keep method call consistent with it.
28 * @library /testlibrary
29 * @modules java.base/jdk.internal.org.objectweb.asm
30 * java.base/jdk.internal.misc
31 * java.management
32 * @compile -XDignore.symbol.file BadMethodHandles.java
33 * @run main/othervm BadMethodHandles
34 */
35
36 import jdk.internal.org.objectweb.asm.*;
37 import java.io.FileOutputStream;
38 import java.lang.reflect.InvocationTargetException;
39 import java.lang.invoke.MethodHandle;
40 import java.lang.invoke.MethodHandles;
41 import java.lang.invoke.MethodType;
42 import static jdk.internal.org.objectweb.asm.Opcodes.*;
43
44 public class BadMethodHandles {
45
46 static byte[] dumpBadInterfaceMethodref() {
47 ClassWriter cw = new ClassWriter(0);
48 cw.visit(52, ACC_PUBLIC | ACC_SUPER, "BadInterfaceMethodref", null, "java/lang/Object", null);
|
8 *
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).
14 *
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.
18 *
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
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8087223
27 * @summary Adding constantTag to keep method call consistent with it.
28 * @modules java.base/jdk.internal.org.objectweb.asm
29 * java.base/jdk.internal.misc
30 * java.management
31 * @compile -XDignore.symbol.file BadMethodHandles.java
32 * @run main/othervm BadMethodHandles
33 */
34
35 import jdk.internal.org.objectweb.asm.*;
36 import java.io.FileOutputStream;
37 import java.lang.reflect.InvocationTargetException;
38 import java.lang.invoke.MethodHandle;
39 import java.lang.invoke.MethodHandles;
40 import java.lang.invoke.MethodType;
41 import static jdk.internal.org.objectweb.asm.Opcodes.*;
42
43 public class BadMethodHandles {
44
45 static byte[] dumpBadInterfaceMethodref() {
46 ClassWriter cw = new ClassWriter(0);
47 cw.visit(52, ACC_PUBLIC | ACC_SUPER, "BadInterfaceMethodref", null, "java/lang/Object", null);
|