commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1091543 - in /commons/proper/net/trunk/src: changes/changes.xml main/java/org/apache/commons/net/pop3/POP3.java main/java/org/apache/commons/net/pop3/POP3Client.java
Date Tue, 12 Apr 2011 19:00:08 GMT
Author: sebb
Date: Tue Apr 12 19:00:07 2011
New Revision: 1091543

URL: http://svn.apache.org/viewvc?rev=1091543&view=rev
Log:
Revert 1087549 - NET-396 - as setState() does need to be public

Modified:
    commons/proper/net/trunk/src/changes/changes.xml
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3.java
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3Client.java

Modified: commons/proper/net/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/changes/changes.xml?rev=1091543&r1=1091542&r2=1091543&view=diff
==============================================================================
--- commons/proper/net/trunk/src/changes/changes.xml (original)
+++ commons/proper/net/trunk/src/changes/changes.xml Tue Apr 12 19:00:07 2011
@@ -105,10 +105,6 @@ KeyManagerUtils can be used to provide c
             <action issue="NET-269" dev="sebb" type="update">
             Remove semi-redundant check in SubnetUtils.calculate().
             </action>
-            <action issue="NET-396" dev="sebb" type="update">
-            POP3.setState() should not be public.
-            Deprecated, and changed to do nothing. Added package-private method for use by
POP3 classes.
-            </action>
             <action issue="NET-219" dev="sebb" type="update">
             Should Telnet class Exception blocks write to System.err?
             Catch blocks removed, and throws clauses added to allow caller to more easily
detect and recover.

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3.java?rev=1091543&r1=1091542&r2=1091543&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3.java Tue Apr 12
19:00:07 2011
@@ -149,31 +149,20 @@ public class POP3 extends SocketClient
           new BufferedWriter(new OutputStreamWriter(_output_,
                                                     __DEFAULT_ENCODING));
         __getReply();
-        _setState(AUTHORIZATION_STATE);
+        setState(AUTHORIZATION_STATE);
     }
 
 
     /**
-     * No longer used, as the state must only be changed by POP3 classes.
-     * @deprecated 3.0 DO NOT USE. Does nothing.
+     * Set the internal POP3 state.
+     * @param state the new state. This must be one of the <code>_STATE</code>
constants.
      */
-    @Deprecated
     public void setState(int state)
     {
-    }
-
-
-    /**
-     * Internal method to set POP3 client state.
-     * This must be one of the <code>_STATE</code> constants.
-     *
-     * @param state  The new state.
-     */
-    void _setState(int state)
-    {
         __popState = state;
     }
 
+
     /***
      * Returns the current POP3 client state.
      * <p>
@@ -219,7 +208,7 @@ public class POP3 extends SocketClient
         __writer = null;
         _lastReplyLine = null;
         _replyLines.clear();
-        _setState(DISCONNECTED_STATE);
+        setState(DISCONNECTED_STATE);
     }
 
 

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3Client.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3Client.java?rev=1091543&r1=1091542&r2=1091543&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3Client.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/pop3/POP3Client.java Tue
Apr 12 19:00:07 2011
@@ -138,7 +138,7 @@ public class POP3Client extends POP3
         if (sendCommand(POP3Command.PASS, password) != POP3Reply.OK)
             return false;
 
-        _setState(TRANSACTION_STATE);
+        setState(TRANSACTION_STATE);
 
         return true;
     }
@@ -207,7 +207,7 @@ public class POP3Client extends POP3
         if (sendCommand(POP3Command.APOP, buffer.toString()) != POP3Reply.OK)
             return false;
 
-        _setState(TRANSACTION_STATE);
+        setState(TRANSACTION_STATE);
 
         return true;
     }
@@ -231,7 +231,7 @@ public class POP3Client extends POP3
     public boolean logout() throws IOException
     {
         if (getState() == TRANSACTION_STATE)
-            _setState(UPDATE_STATE);
+            setState(UPDATE_STATE);
         sendCommand(POP3Command.QUIT);
         return (_replyCode == POP3Reply.OK);
     }



Mime
View raw message