8231631: sun/net/ftp/FtpURLConnectionLeak.java fails intermittently with NPE

Sun/net/www/ftptest/FtpCommandHandler.java is modified to handle EOF properly

Reviewed-by: chegar, vtewari
This commit is contained in:
Daniel Fuchs 2019-10-31 19:31:03 +00:00
parent 6d98a3bdd8
commit 7df849224b

View File

@ -466,6 +466,10 @@ public class FtpCommandHandler extends Thread {
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) {