Integrated: 8359497: IllegalArgumentException thrown by SourceCodeAnalysisImpl.highlights()
Jan Lahoda
jlahoda at openjdk.org
Mon Aug 25 07:18:57 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).
This pull request has now been integrated.
Changeset: d99fb09a
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/d99fb09a20df2639af23d1083afd14247abb991e
Stats: 13 lines in 2 files changed: 11 ins; 0 del; 2 mod
8359497: IllegalArgumentException thrown by SourceCodeAnalysisImpl.highlights()
Reviewed-by: vromero
-------------
PR: https://git.openjdk.org/jdk/pull/26446
More information about the compiler-dev
mailing list