Thu, 29 Nov 2012 23:02:52 +0100
8004199: Change the ASM package for Test8003720
Reviewed-by: kvn, jrose
test/runtime/8003720/Asmator.java | file | annotate | diff | comparison | revisions | |
test/runtime/8003720/Test8003720.java | file | annotate | diff | comparison | revisions |
1.1 --- a/test/runtime/8003720/Asmator.java Thu Nov 29 16:50:29 2012 -0500 1.2 +++ b/test/runtime/8003720/Asmator.java Thu Nov 29 23:02:52 2012 +0100 1.3 @@ -1,9 +1,34 @@ 1.4 -import com.sun.xml.internal.ws.org.objectweb.asm.*; 1.5 +/* 1.6 + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 1.7 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 + * 1.9 + * This code is free software; you can redistribute it and/or modify it 1.10 + * under the terms of the GNU General Public License version 2 only, as 1.11 + * published by the Free Software Foundation. 1.12 + * 1.13 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.14 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.15 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.16 + * version 2 for more details (a copy is included in the LICENSE file that 1.17 + * accompanied this code). 1.18 + * 1.19 + * You should have received a copy of the GNU General Public License version 1.20 + * 2 along with this work; if not, write to the Free Software Foundation, 1.21 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.22 + * 1.23 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.24 + * or visit www.oracle.com if you need additional information or have any 1.25 + * questions. 1.26 + * 1.27 + */ 1.28 + 1.29 +import jdk.internal.org.objectweb.asm.*; 1.30 1.31 class Asmator { 1.32 static byte[] fixup(byte[] buf) throws java.io.IOException { 1.33 ClassReader cr = new ClassReader(buf); 1.34 - ClassWriter cw = new ClassWriter(0) { 1.35 + ClassWriter cw = new ClassWriter(0); 1.36 + ClassVisitor cv = new ClassVisitor(Opcodes.ASM4, cw) { 1.37 public MethodVisitor visitMethod( 1.38 final int access, 1.39 final String name, 1.40 @@ -25,7 +50,7 @@ 1.41 return mv; 1.42 } 1.43 }; 1.44 - cr.accept(cw, 0); 1.45 + cr.accept(cv, 0); 1.46 return cw.toByteArray(); 1.47 } 1.48 }
2.1 --- a/test/runtime/8003720/Test8003720.java Thu Nov 29 16:50:29 2012 -0500 2.2 +++ b/test/runtime/8003720/Test8003720.java Thu Nov 29 23:02:52 2012 +0100 2.3 @@ -26,7 +26,7 @@ 2.4 * @test 2.5 * @bug 8003720 2.6 * @summary Method in interpreter stack frame can be deallocated 2.7 - * @compile -XDignore.symbol.file Victim.java 2.8 + * @compile -XDignore.symbol.file -source 1.7 -target 1.7 Victim.java 2.9 * @run main/othervm -Xverify:all -Xint Test8003720 2.10 */ 2.11