< prev index next >

test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java

Print this page




   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 8042235
  27  * @summary redefining method used by multiple MethodHandles crashes VM
  28  * @compile -XDignore.symbol.file RedefineMethodUsedByMultipleMethodHandles.java
  29  * @run main RedefineMethodUsedByMultipleMethodHandles
  30  */
  31 
  32 import java.io.*;
  33 import java.lang.instrument.*;
  34 import java.lang.invoke.*;
  35 import java.lang.invoke.MethodHandles.Lookup;
  36 import java.lang.management.*;
  37 import java.lang.reflect.*;
  38 import java.nio.file.*;
  39 import java.security.*;
  40 import java.util.jar.*;
  41 
  42 import javax.tools.*;
  43 
  44 import jdk.internal.org.objectweb.asm.*;
  45 
  46 public class RedefineMethodUsedByMultipleMethodHandles {
  47 
  48     static class Foo {
  49         public static Object getName() {




   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 8042235
  27  * @summary redefining method used by multiple MethodHandles crashes VM
  28  * @compile -XDignore.symbol.file RedefineMethodUsedByMultipleMethodHandles.java
  29  * @run main/othervm RedefineMethodUsedByMultipleMethodHandles
  30  */
  31 
  32 import java.io.*;
  33 import java.lang.instrument.*;
  34 import java.lang.invoke.*;
  35 import java.lang.invoke.MethodHandles.Lookup;
  36 import java.lang.management.*;
  37 import java.lang.reflect.*;
  38 import java.nio.file.*;
  39 import java.security.*;
  40 import java.util.jar.*;
  41 
  42 import javax.tools.*;
  43 
  44 import jdk.internal.org.objectweb.asm.*;
  45 
  46 public class RedefineMethodUsedByMultipleMethodHandles {
  47 
  48     static class Foo {
  49         public static Object getName() {


< prev index next >