commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1081891 - in /commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp: NNTP.java NNTPCommand.java
Date Tue, 15 Mar 2011 18:33:41 GMT
Author: sebb
Date: Tue Mar 15 18:33:41 2011
New Revision: 1081891

URL: http://svn.apache.org/viewvc?rev=1081891&view=rev
Log:
Make array private and use getter instead

Modified:
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTP.java
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTPCommand.java

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTP.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTP.java?rev=1081891&r1=1081890&r2=1081891&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTP.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTP.java Tue Mar 15
18:33:41 2011
@@ -307,7 +307,7 @@ public class NNTP extends SocketClient
      ***/
     public int sendCommand(int command, String args) throws IOException
     {
-        return sendCommand(NNTPCommand._commands[command], args);
+        return sendCommand(NNTPCommand.getCommand(command), args);
     }
 
 

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTPCommand.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTPCommand.java?rev=1081891&r1=1081890&r2=1081891&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTPCommand.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/nntp/NNTPCommand.java Tue
Mar 15 18:33:41 2011
@@ -52,7 +52,7 @@ public final class NNTPCommand
     private NNTPCommand()
     {}
 
-    static final String[] _commands = {
+    private static final String[] _commands = {
         "ARTICLE", "BODY", "GROUP", "HEAD", "HELP", "IHAVE", "LAST", "LIST",
         "NEWGROUPS", "NEWNEWS", "NEXT", "POST", "QUIT", "SLAVE", "STAT",
         "AUTHINFO", "XOVER", "XHDR"
@@ -67,7 +67,7 @@ public final class NNTPCommand
      * @return The NNTP protcol command string corresponding to a specified
      *         command code.
      ***/
-    public static final String getCommand(int command)
+    static final String getCommand(int command)
     {
         return _commands[command];
     }



Mime
View raw message