commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r903844 - in /commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp: FTP.java FTPCommand.java
Date Wed, 27 Jan 2010 21:18:00 GMT
Author: sebb
Date: Wed Jan 27 21:18:00 2010
New Revision: 903844

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

Modified:
    commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTP.java
    commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPCommand.java

Modified: commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTP.java
URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTP.java?rev=903844&r1=903843&r2=903844&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTP.java
(original)
+++ commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTP.java
Wed Jan 27 21:18:00 2010
@@ -528,7 +528,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/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPCommand.java
URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPCommand.java?rev=903844&r1=903843&r2=903844&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPCommand.java
(original)
+++ commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPCommand.java
Wed Jan 27 21:18:00 2010
@@ -114,7 +114,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