RFR: 8319532: jshell - Non-sealed declarations sometimes break a snippet evaluation
Adam Sotona
asotona at openjdk.org
Tue Nov 7 10:27:30 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.
Looks good.
-------------
Marked as reviewed by asotona (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16523#pullrequestreview-1717341561
More information about the kulla-dev
mailing list