commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r903847 - in /commons/proper/net/trunk/src/java/org/apache/commons/net/ftp: FTP.java FTPCommand.java
Date Wed, 27 Jan 2010 21:19:53 GMT
Author: sebb
Date: Wed Jan 27 21:19:53 2010
New Revision: 903847

URL: http://svn.apache.org/viewvc?rev=903847&view=rev
Log:
Only allow access to command name list via getter

Modified:
    commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTP.java
    commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPCommand.java

Modified: commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTP.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTP.java?rev=903847&r1=903846&r2=903847&view=diff
==============================================================================
--- commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTP.java (original)
+++ commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTP.java Wed Jan 27 21:19:53
2010
@@ -538,7 +538,7 @@
      ***/
     public int sendCommand(int command, String args) throws IOException
     {
-        return sendCommand(FTPCommand._commands[command], args);
+        return sendCommand(FTPCommand.getCommand(command), args);
     }
 
 

Modified: commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPCommand.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPCommand.java?rev=903847&r1=903846&r2=903847&view=diff
==============================================================================
--- commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPCommand.java (original)
+++ commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPCommand.java Wed Jan 27
21:19:53 2010
@@ -104,7 +104,7 @@
     private FTPCommand()
     {}
 
-    static final String[] _commands = {
+    private static final String[] _commands = {
                                           "USER", "PASS", "ACCT", "CWD", "CDUP", "SMNT",
"REIN", "QUIT", "PORT",
                                           "PASV", "TYPE", "STRU", "MODE", "RETR", "STOR",
"STOU", "APPE", "ALLO",
                                           "REST", "RNFR", "RNTO", "ABOR", "DELE", "RMD",
"MKD", "PWD", "LIST",



Mime
View raw message