test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvokeErrors.java
changeset 52066 49a21be61dcd
parent 50735 2f2af62dfac7
child 53853 7ca9e625d6b2
--- a/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvokeErrors.java	Tue Oct 09 14:57:23 2018 -0700
+++ b/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvokeErrors.java	Tue Oct 09 20:19:22 2018 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8046171
+ * @bug 8046171 8211065
  * @summary Setup nestmate calls to private methods then use
  *          modified jcod classes to introduce errors. Test with
  *          and without verification enabled
@@ -96,14 +96,10 @@
             System.out.println("Got expected exception:" + nsme);
         }
 
-        try {
-            MissingMethodWithSuper m = new MissingMethodWithSuper();
-            m.priv_invoke();
-            throw new Error("Unexpected success invoking MissingMethodWithSuper.priv_invoke");
-        }
-        catch (NoSuchMethodError nsme) {
-            System.out.println("Got expected exception:" + nsme);
-        }
+        // This test was revised to expect successful invocation of the
+        // super class method - see JDK-8211065
+        MissingMethodWithSuper m = new MissingMethodWithSuper();
+        m.priv_invoke();
 
         // Verification of Helper will trigger the nestmate access check failure
         try {