RFR: 8319532: jshell - Non-sealed declarations sometimes break a snippet evaluation
Jan Lahoda
jlahoda at openjdk.org
Mon Nov 6 16:48:17 UTC 2023
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.
-------------
Commit messages:
- Cleanup.
- 8319532: jshell - Non-sealed declarations sometimes break a snippet evaluation
Changes: https://git.openjdk.org/jdk/pull/16523/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16523&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8319532
Stats: 10 lines in 2 files changed: 7 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/16523.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16523/head:pull/16523
PR: https://git.openjdk.org/jdk/pull/16523
More information about the kulla-dev
mailing list