Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
FindBugs reports a bug in MVSFTPEntryParser#parseUnixList:
"Bug: The parameter file to org.apache.commons.net.ftp.parser.MVSFTPEntryParser.parseUnixList(FTPFile, String) is dead upon entry but overwritten
The initial value of this parameter is ignored, and the parameter is overwritten here. This often indicates a mistaken belief that the write to the parameter will be conveyed back to the caller."
Since the other parsexxx() methods update the passed FTPFile parameter it looks like it was indeed the intention to update the parameter.
Unfortunately there are no tests which exercise this code, and I have been unable to find examples of FTP LIST output for MVS in Unix mode. The code in preParse() looks for the string "total" at the start of the first line of output. [Presumably subsequent lines look like normal Unix FTP listings.]