changeset 1451:e281c7a891f9

8138910: Ctrl-D causes jjs to crash with NPE Reviewed-by: attila, hannesw
author sundar
date Tue, 06 Oct 2015 14:31:38 +0530
parents d47674217066
children a261947d1e0e
files src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java	Mon Oct 05 18:58:21 2015 +0200
+++ b/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java	Tue Oct 06 14:31:38 2015 +0530
@@ -154,6 +154,10 @@
                     break;
                 }
 
+                if (source == null) {
+                    break;
+                }
+
                 if (source.isEmpty()) {
                     continue;
                 }