File tree 1 file changed +3
-2
lines changed
src/main/java/org/apache/commons/net/ftp
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 33
33
import org .apache .commons .net .SocketClient ;
34
34
35
35
/***
36
- * FTP provides basic functionality necessary to implement your
36
+ * FTP provides the basic the functionality necessary to implement your
37
37
* own FTP client. It extends org.apache.commons.net.SocketClient since
38
38
* extending TelnetClient was causing unwanted behavior (like connections
39
39
* that did not time out properly).
@@ -311,7 +311,8 @@ private void __getReply() throws IOException
311
311
// returning too soon after encountering a naked CR or some other
312
312
// anomaly.
313
313
}
314
- while ((line .length () >= 4 || line .charAt (3 ) == '-' || !(line .substring (0 ,3 ).matches ("\\ d{3}" ))));
314
+ while (!(line .length () >= 4 && line .charAt (3 ) != '-' &&
315
+ Character .isDigit (line .charAt (0 ))));
315
316
// This is too strong a condition because of non-conforming ftp
316
317
// servers like ftp.funet.fi which sent 226 as the last line of a
317
318
// 426 multi-line reply in response to ls /. We relax the condition to
You can’t perform that action at this time.
0 commit comments