Integrated: 8319532: jshell - Non-sealed declarations sometimes break a snippet evaluation
Jan Lahoda
jlahoda at openjdk.org
Tue Nov 7 15:30:41 UTC 2023
On Mon, 6 Nov 2023 16:42:49 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> JShell does not understand "non-sealed" modifier when splitting input into snippets. The reason is that `CompletenessAnalyzer.parseDeclaration` (https://github.com/openjdk/jdk/blob/cdf337357a62dd52c00e56e75912565e15b6adfd/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java#L687) is skipping through the declaration's initial tokens, but does not know it should ignore the `-` in the `non-sealed`. This patch fixes that by making `-` part of the declaration.
This pull request has now been integrated.
Changeset: 45e68ae2
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/45e68ae2079336cea45dcbc39189639c06a05e0c
Stats: 10 lines in 2 files changed: 7 ins; 0 del; 3 mod
8319532: jshell - Non-sealed declarations sometimes break a snippet evaluation
Reviewed-by: asotona
-------------
PR: https://git.openjdk.org/jdk/pull/16523
More information about the kulla-dev
mailing list