changeset 14712:24c643add3fb

8159031: jjs throws NoSuchFileException if ~/.jjs.history does not exist Reviewed-by: sundar, mhaupt
author hannesw
date Wed, 08 Jun 2016 15:50:11 +0200
parents 4f717d517d9e
children e80525b7d07d
files src/jdk.internal.le/share/classes/jdk/internal/jline/extra/EditingHistory.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.internal.le/share/classes/jdk/internal/jline/extra/EditingHistory.java	Wed Jun 08 16:25:39 2016 +0800
+++ b/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) {