RFR 9: 8178077: jshell tool: crash on ctrl-up or ctrl-down
Jan Lahoda
jan.lahoda at oracle.com
Wed Apr 5 17:46:56 UTC 2017
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