RFR: JDK-8247932: JShell crashes when typing text block

Jan Lahoda jan.lahoda at oracle.com
Fri Jun 19 17:28:02 UTC 2020


Hi,

In JDK 15, we've improved JShell to automatically indent multi-line 
snippets while typing them. To detect the proper indent, it is necessary 
to detect '{' and '}'. The javac's lexer has been used for this 
detection. But there is a bug in that - the javac's Log is not properly 
configured for that:
a) the Log's source is not configured (which leads to the exception from 
the bug)
b) the Log will print any errors detected while detecting the indent to 
the System.err

These are obviously undesirable, so the proposed patch sets a Log's 
source, and and configures Log to ignore all diagnostics reported.

Proposed webrev:
http://cr.openjdk.java.net/~jlahoda/8247932/webrev.00/

JBS:
https://bugs.openjdk.java.net/browse/JDK-8247932

Does this look sensible?

Thanks,
     Jan


More information about the kulla-dev mailing list