You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ol...@apache.org on 2004/06/11 21:26:27 UTC

cvs commit: jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl EasySSLProtocolSocketFactory.java

olegk       2004/06/11 12:26:27

  Modified:    httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl
                        EasySSLProtocolSocketFactory.java
  Log:
  ReflectionSocketFactory incorrecly applied
  
  Revision  Changes    Path
  1.7       +9 -17     jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/EasySSLProtocolSocketFactory.java
  
  Index: EasySSLProtocolSocketFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/EasySSLProtocolSocketFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EasySSLProtocolSocketFactory.java	10 Jun 2004 18:25:24 -0000	1.6
  +++ EasySSLProtocolSocketFactory.java	11 Jun 2004 19:26:27 -0000	1.7
  @@ -38,7 +38,6 @@
   import org.apache.commons.httpclient.HttpClientError;
   import org.apache.commons.httpclient.params.HttpConnectionParams;
   import org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory;
  -import org.apache.commons.httpclient.protocol.ReflectionSocketFactory;
   import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
   import org.apache.commons.logging.Log; 
   import org.apache.commons.logging.LogFactory;
  @@ -82,7 +81,7 @@
    *     </pre>
    * </p>
    * 
  - * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
  + * @author <a href="mailto:oleg -at- ural.ru">Oleg Kalnichevski</a>
    * 
    * <p>
    * DISCLAIMER: HttpClient developers DO NOT actively support this component.
  @@ -147,12 +146,10 @@
       /**
        * Attempts to get a new socket connection to the given host within the given time limit.
        * <p>
  -     * This method employs several techniques to circumvent the limitations of older JREs that 
  -     * do not support connect timeout. When running in JRE 1.4 or above reflection is used to 
  -     * call Socket#connect(SocketAddress endpoint, int timeout) method. When executing in older 
  -     * JREs a controller thread is executed. The controller thread attempts to create a new socket
  -     * within the given limit of time. If socket constructor does not return until the timeout 
  -     * expires, the controller terminates and throws an {@link ConnectTimeoutException}
  +     * To circumvent the limitations of older JREs that do not support connect timeout a 
  +     * controller thread is executed. The controller thread attempts to create a new socket 
  +     * within the given limit of time. If socket constructor does not return until the 
  +     * timeout expires, the controller terminates and throws an {@link ConnectTimeoutException}
        * </p>
        *  
        * @param host the host name/IP
  @@ -182,13 +179,8 @@
               return createSocket(host, port, localAddress, localPort);
           } else {
               // To be eventually deprecated when migrated to Java 1.4 or above
  -            Socket socket = ReflectionSocketFactory.createSocket(
  -                "javax.net.ssl.SSLSocketFactory", host, port, localAddress, localPort, timeout);
  -            if (socket == null) {
  -                socket = ControllerThreadSocketFactory.createSocket(
  +            return ControllerThreadSocketFactory.createSocket(
                       this, host, port, localAddress, localPort, timeout);
  -            }
  -            return socket;
           }
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org