RFR: 8359497: IllegalArgumentException thrown by SourceCodeAnalysisImpl.highlights()
Vicente Romero
vromero at openjdk.org
Wed Aug 13 21:50:10 UTC 2025
On Wed, 23 Jul 2025 14:56:22 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> When JShell computes highlights, it uses the javac' lexer to detect keywords. But, if there's a lexical error in the input, the lexer will try to report an error, but that will with an exception, as there's no input file set. This PR:
> - sets a source to `Log` so that the attempt to report the error will not fail
> - sets a `DiagnosticListener` so that the error is ignored (as the error is not important, this lexer is only used to detect keyword).
lgtm
-------------
Marked as reviewed by vromero (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26446#pullrequestreview-3117823048
More information about the compiler-dev
mailing list