Staffan,

Looks good for me!

-Dmitry


On 2016-08-15 21:15, Staffan Larsen wrote:
> All,
> 
> Please review this fix for a test that starting failing after recent changes 
> to java.lang.invoke. 
> 
> The test instructs jdb to break on all exceptions matching "java.lang.I*" 
> (that's a capital 'i'). The semantics of that operation actually means "break 
> on all exceptions which have a class name or superclass name matching this 
> string". 
> 
> Some of the recent changes in java.lang.invoke now causes the code to throw 
> numerous java.lang.NoSuchMethodErrors. This is a subclass of 
> java.lang.IncompatibleClassChangeError, which matches "java.lang.I*". 
> 
> The net result is that jdb will break on a lot more places (all the 
> NoSuchMethodError exceptions) than the test expects and the test fails. 
> 
> We can work around this in the test by changing this line: 
> 
>    cmd catch all java.lang.I* 
> 
> to the following two lines: 
> 
>    cmd catch all java.lang.Il* 
>    cmd catch all java.lang.Ind* 
> 
> This will still match the exception types the test is looking for 
> (IllegalArgumentException, IllegalMonitorStateException, and 
> IndexOutOfBoundsException), but it will not match 
> IncompatibleClassChangeError. 
> 
> Thanks,
> /Staffan
> 
> 
> diff --git a/test/com/sun/jdi/CatchPatternTest.sh 
> b/test/com/sun/jdi/CatchPatternTest.sh
> --- a/test/com/sun/jdi/CatchPatternTest.sh
> +++ b/test/com/sun/jdi/CatchPatternTest.sh
> @@ -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
> 


-- 
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.

Reply via email to