RFR: 8232856: jshell crashes when pressing up arrow after /!
Jan Lahoda
jlahoda at openjdk.java.net
Tue Sep 15 10:01:26 UTC 2020
When re-running snippets, we remove the last entry (which is e.g. '/!'), and then put the expanded code back. But,
while adding the code back, it is detected the entry-to-be-added duplicates the previous entry and is not added. But an
internal "index" value is not updated, and still has the value it had before the removal, leading to inconsistency in
the history internal data, and eventually, to a crash. Calling resetIndex() should fix the internal data.
-------------
Commit messages:
- 8232856: jshell crashes when pressing up arrow after /!
Changes: https://git.openjdk.java.net/jdk/pull/173/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=173&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8232856
Stats: 14 lines in 2 files changed: 13 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/173.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/173/head:pull/173
PR: https://git.openjdk.java.net/jdk/pull/173
More information about the kulla-dev
mailing list