commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1086089 - /commons/proper/net/trunk/src/main/java/org/apache/commons/net/imap/IMAPCommand.java
Date Mon, 28 Mar 2011 00:53:36 GMT
Author: sebb
Date: Mon Mar 28 00:53:36 2011
New Revision: 1086089

URL: http://svn.apache.org/viewvc?rev=1086089&view=rev
Log:
Alternate method for getting IMAP command from the enum

Modified:
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/imap/IMAPCommand.java

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/imap/IMAPCommand.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/imap/IMAPCommand.java?rev=1086089&r1=1086088&r2=1086089&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/imap/IMAPCommand.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/imap/IMAPCommand.java Mon
Mar 28 00:53:36 2011
@@ -61,7 +61,10 @@ public enum IMAPCommand
     ;
     
     private final String imapCommand;
+    
+    @SuppressWarnings("unused") // not yet used
     private final int minParamCount;
+    @SuppressWarnings("unused") // not yet used
     private final int maxParamCount;
 
     IMAPCommand(){
@@ -89,6 +92,7 @@ public enum IMAPCommand
         this.minParamCount = minCount;
         this.maxParamCount = maxCount;
     }
+
     /**
      * Get the IMAP protocol string command corresponding to a command code.
      *
@@ -99,7 +103,12 @@ public enum IMAPCommand
         return command.getIMAPCommand();
     }
 
-    private String getIMAPCommand() {
+    /**
+     * Get the IMAP protocol string command for this command
+     *
+     * @return The IMAP protocol string command corresponding to this command
+     */
+    public String getIMAPCommand() {
         return imapCommand != null ? imapCommand : name();
     }
 



Mime
View raw message