[ https://issues.apache.org/jira/browse/NET-310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved NET-310. ---------------------- Resolution: Fixed Fix Version/s: 3.3 URL: http://svn.apache.org/viewvc?rev=1437631&view=rev Log: NET-310 FTPCommand conversion to use enum; added FTPCmd emum and deprecated FTPCommand. Added: commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPCmd.java (with props) Modified: commons/proper/net/trunk/src/changes/changes.xml commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTP.java commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPCommand.java commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPHTTPClient.java commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPSClient.java commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/FTPCommandTest.java commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/DownloadListings.java > FTPCommand conversion to use enum > --------------------------------- > > Key: NET-310 > URL: https://issues.apache.org/jira/browse/NET-310 > Project: Commons Net > Issue Type: Improvement > Components: FTP > Reporter: Sebb > Priority: Minor > Fix For: 3.3 > > Attachments: FTPCmd.patch, FTPCommandEnum.patch > > > Seems to me it would be sensible to replace the integer values in the > FTPCommand class with an enum. > I propose creating a new enum class (called FTPCommands) which contains the > enum and aliases. The existing FTPCommand class is then rewritten using the > enum ordinals; and the FTP class is changed to use the enums internally. > Existing public methods which use an integer for the command id are > deprecated. > If there are any further commands added to the set lter, they should only be > added to the enum, and no corresponding ints should be defined. > See attached patch (to follow). I've not fixed the FTP subclasses yet as I > wanted to get agreement on the approach first. > Note that the new class name FTPCommands is very similar to the old class > FTPCommand; of course that can be changed. > Comments? Suggestions? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira