RFR 9: 8178077: jshell tool: crash on ctrl-up or ctrl-down

Robert Field robert.field at oracle.com
Wed Apr 5 17:52:26 UTC 2017


Fix looks good.

If there is some way to test this....

-Robert

On 04/05/17 10:46, Jan Lahoda wrote:
> Hi,
>
> The bug is a crash when the user presses Ctrl-up/down (which should 
> navigate to the previous/next snippet). This is broken because this 
> (needs to) invoke a private method on ConsoleReader, and it lookups 
> the method using "in.getClass().getDeclaredMethod", which fails if 
> "in" is a subclass of ConsoleReader not a ConsoleReader itself. The 
> fix is to be more precise and use 
> "ConsoleReader.class.getDeclaredMethod".
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8178077
> Webrev: http://cr.openjdk.java.net/~jlahoda/8178077/webrev.00/
>
> Any feedback is welcome,
>     Jan



More information about the kulla-dev mailing list