mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-24 12:28:12 +00:00
8159031: jjs throws NoSuchFileException if ~/.jjs.history does not exist
Reviewed-by: sundar, mhaupt
This commit is contained in:
parent
5a190a8ec6
commit
54ec7c6b21
@ -59,7 +59,8 @@ class Console implements AutoCloseable {
|
||||
in.setHandleUserInterrupt(true);
|
||||
in.setBellEnabled(true);
|
||||
in.setCopyPasteDetection(true);
|
||||
in.setHistory(new EditingHistory(in, Files.readAllLines(historyFile.toPath())) {
|
||||
final Iterable<String> existingHistory = historyFile.exists() ? Files.readAllLines(historyFile.toPath()) : null;
|
||||
in.setHistory(new EditingHistory(in, existingHistory) {
|
||||
@Override protected boolean isComplete(CharSequence input) {
|
||||
return completer.isComplete(input.toString());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user