hotspot/test/runtime/ConstantPool/TestMethodHandleConstant.java
changeset 42074 c069e5e285cb
parent 39398 16b3ed4012f8
--- a/hotspot/test/runtime/ConstantPool/TestMethodHandleConstant.java	Thu Oct 27 09:42:45 2016 -0500
+++ b/hotspot/test/runtime/ConstantPool/TestMethodHandleConstant.java	Fri Oct 14 14:47:01 2016 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8159470
+ * @bug 8159470 8166974
  * @summary Test that MethodHandle constants are checked
  * @modules java.base/jdk.internal.misc
  * @compile WithConfiguration.jcod
@@ -33,12 +33,13 @@
 
     public static void main(String[] args) {
         try {
-          // This interface has bad constant pool entry for MethodHandle -> Method
-          String URI_DEFAULT
-            = WithConfiguration.autoDetect().getLocation();
-          throw new RuntimeException("FAILED, ICCE not thrown");
-        } catch (BootstrapMethodError icce) {
-          System.out.println("PASSED, expecting ICCE" + icce.getMessage());
+            // This interface has bad constant pool entry for MethodHandle -> Method
+            String URI_DEFAULT
+                    = WithConfiguration.autoDetect().getLocation();
+            throw new RuntimeException("FAILED, IncompatibleClassChangeError not thrown");
+        }
+        catch (IncompatibleClassChangeError icce) {
+            System.out.println("PASSED, expecting IncompatibleClassChangeError" + icce.getMessage());
         }
     }
 }