8164012: com/sun/jdi/CatchPatternTest.sh fails on jdk9/hs with Required output "Exception occurred: java.lang.IllegalMonitorStateException" not found
authorsla
Tue, 16 Aug 2016 09:57:50 +0200
changeset 40468 ae9bae97a312
parent 40467 59974d82d6a7
child 40469 15567343b987
child 40685 e6f3a9fff607
8164012: com/sun/jdi/CatchPatternTest.sh fails on jdk9/hs with Required output "Exception occurred: java.lang.IllegalMonitorStateException" not found Summary: Change test so that irrelevant exceptions do not interfere Reviewed-by: dholmes, dsamersoff
jdk/test/com/sun/jdi/CatchPatternTest.sh
--- a/jdk/test/com/sun/jdi/CatchPatternTest.sh	Mon Aug 15 15:35:27 2016 -0400
+++ b/jdk/test/com/sun/jdi/CatchPatternTest.sh	Tue Aug 16 09:57:50 2016 +0200
@@ -87,7 +87,12 @@
    cmd stop in ${classname}.partTwo
    runToBkpt
    cmd ignore uncaught java.lang.Throwable
-   cmd catch all java.lang.I*
+   # Instead of matching java.lang.I* we use two more specific
+   # patterns here. The reason is to avoid matching IncompatibleClassChangeError
+   # (or the subclass NoSuchMethodError) thrown by the
+   # java.lang.invoke infrastructure.
+   cmd catch all java.lang.Il*
+   cmd catch all java.lang.Ind*
    cmd cont
    cmd cont
    cmd cont