--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java Fri Jan 20 14:13:11 2017 -0500
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java Sat Jan 21 08:38:51 2017 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -3522,7 +3522,8 @@
System.err.flush();
reply = (new BufferedReader(new InputStreamReader
(System.in))).readLine();
- if (collator.compare(reply, "") == 0 ||
+ if (reply == null ||
+ collator.compare(reply, "") == 0 ||
collator.compare(reply, rb.getString("n")) == 0 ||
collator.compare(reply, rb.getString("no")) == 0) {
reply = "NO";