commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (NET-631) Bug in MVSFTPEntryParser.parseUnixList (FindBugs)
Date Thu, 23 Mar 2017 23:52:41 GMT

     [ https://issues.apache.org/jira/browse/NET-631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb resolved NET-631.
----------------------
       Resolution: Fixed
    Fix Version/s: 3.7

URL: http://svn.apache.org/viewvc?rev=1788347&view=rev
Log:
NET-631 Bug in MVSFTPEntryParser.parseUnixList (FindBugs)

Modified:
    commons/proper/net/trunk/src/changes/changes.xml
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParser.java
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java



> 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
>             Fix For: 3.7
>
>
> 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)

Mime
View raw message