Sebb created NET-631:
------------------------

             Summary: Bug in MVSFTPEntryParser.parseUnixList (FindBugs)
                 Key: NET-631
                 URL: https://issues.apache.org/jira/browse/NET-631
             Project: Commons Net
          Issue Type: Bug
            Reporter: Sebb


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.]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to