commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1086599 - in /commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3: POP3Command.java POP3SClient.java
Date Tue, 29 Mar 2011 14:35:34 GMT
Author: sebb
Date: Tue Mar 29 14:35:34 2011
New Revision: 1086599

URL: http://svn.apache.org/viewvc?rev=1086599&view=rev
Log:
All commands should be defined in POP3Command

Modified:
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3Command.java
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3SClient.java

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3Command.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3Command.java?rev=1086599&r1=1086598&r2=1086599&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3Command.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3Command.java Tue
Mar 29 14:35:34 2011
@@ -60,12 +60,18 @@ public final class POP3Command
      * @since 3.0 
      */
     public static final int AUTH = 13;
-    
-    private static final int _NEXT_ = AUTH + 1; // update as necessary when adding new entries
+
+    /** 
+     * The TLS start command.
+     * @since 3.0
+     */
+    public static final int STLS = 14;
+
+    private static final int _NEXT_ = STLS + 1; // update as necessary when adding new entries
 
     static final String[] _commands = {
                                           "USER", "PASS", "QUIT", "STAT", "LIST", "RETR",
"DELE", "NOOP", "RSET",
-                                          "APOP", "TOP", "UIDL", "CAPA", "AUTH"
+                                          "APOP", "TOP", "UIDL", "CAPA", "AUTH", "STLS"
                                       };
 
     static {

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3SClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3SClient.java?rev=1086599&r1=1086598&r2=1086599&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3SClient.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3SClient.java Tue
Mar 29 14:35:34 2011
@@ -52,8 +52,6 @@ public class POP3SClient extends POP3Cli
 
     private static final int DEFAULT_POP3S_PORT = 995;
 
-    /** The TLS start command. */
-    private static final String tlsCommand = "STLS";
     /** Default secure socket protocol name, like TLS */
     private static final String DEFAULT_PROTOCOL = "TLS";
 
@@ -287,7 +285,7 @@ public class POP3SClient extends POP3Cli
      */
     public boolean execTLS() throws SSLException, IOException
     {
-        if (sendCommand(tlsCommand) != POP3Reply.OK)
+        if (sendCommand(POP3Command.STLS) != POP3Reply.OK)
         {
             return false;
             //throw new SSLException(getReplyString());



Mime
View raw message