changeset 57286:5f1fe5971ff9

8231631: sun/net/ftp/FtpURLConnectionLeak.java fails intermittently with NPE Summary: sun/net/www/ftptest/FtpCommandHandler.java is modified to handle EOF properly Reviewed-by: chegar, vtewari
author dfuchs
date Thu, 31 Oct 2019 19:31:03 +0000
parents ca70299778b9
children c440a6b4e096
files test/jdk/sun/net/www/ftptest/FtpCommandHandler.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/sun/net/www/ftptest/FtpCommandHandler.java	Thu Oct 31 16:45:58 2019 +0000
+++ b/test/jdk/sun/net/www/ftptest/FtpCommandHandler.java	Thu Oct 31 19:31:03 2019 +0000
@@ -466,6 +466,10 @@
             try {
                 str = in.readLine();
                 System.out.println("line: " + str);
+                if (str == null) {
+                    System.out.println("EOF read from input");
+                    break;
+                }
                 buf = new StringBuffer(str);
                 res = parseCmd(buf);
                 switch (res) {