8159031: jjs throws NoSuchFileException if ~/.jjs.history does not exist
Reviewed-by: sundar, mhaupt
--- a/jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/extra/EditingHistory.java Wed Jun 08 16:25:39 2016 +0800
+++ b/jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/extra/EditingHistory.java Wed Jun 08 15:50:11 2016 +0200
@@ -54,7 +54,9 @@
(Runnable) () -> moveHistoryToSnippet(in, ((EditingHistory) in.getHistory())::previousSnippet));
bind(in, CTRL_DOWN,
(Runnable) () -> moveHistoryToSnippet(in, ((EditingHistory) in.getHistory())::nextSnippet));
- load(originalHistory);
+ if (originalHistory != null) {
+ load(originalHistory);
+ }
}
private void moveHistoryToSnippet(ConsoleReader in, Supplier<Boolean> action) {