commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpMultiClient.java
Date Sun, 21 Jul 2002 05:11:01 GMT
dion        2002/07/20 22:11:01

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpMultiClient.java
  Log:
  Style violations
  
  Revision  Changes    Path
  1.8       +27 -46    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMultiClient.java
  
  Index: HttpMultiClient.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMultiClient.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HttpMultiClient.java	21 Jul 2002 04:12:45 -0000	1.7
  +++ HttpMultiClient.java	21 Jul 2002 05:11:01 -0000	1.8
  @@ -82,9 +82,11 @@
   
       // -------------------------------------------------------- Class Variables
   
  +    /** logging output */
       private static final Log log = LogFactory.getLog(HttpMultiClient.class.getName());
   
       // ----------------------------------------------------- Instance Variables
  +    /** cookies and other shared state */
       private HttpSharedState state = null;
       private HttpConnectionManager mgr = new HttpConnectionManager();
       private boolean strictMode = true;
  @@ -120,8 +122,7 @@
        * @see #getState()
        *
        */
  -    public void setState(HttpSharedState state)
  -    {
  +    public void setState(HttpSharedState state) {
           this.state = state;
       }
   
  @@ -133,10 +134,8 @@
        * @see #setState(HttpSharedState)
        *
        */
  -    public HttpSharedState getState()
  -    {
  -        if (state == null)
  -        {
  +    public HttpSharedState getState() {
  +        if (state == null) {
               state = new HttpSharedState();
           }
   
  @@ -150,8 +149,7 @@
        * @see #isStrictMode()
        *
        */
  -    public void setStrictMode(boolean strictMode)
  -    {
  +    public void setStrictMode(boolean strictMode) {
           this.strictMode = strictMode;
       }
   
  @@ -162,8 +160,7 @@
        * @see #setStrictMode(boolean)
        *
        */
  -    public boolean isStrictMode()
  -    {
  +    public boolean isStrictMode() {
           return strictMode;
       }
   
  @@ -177,8 +174,7 @@
        * @see #getConnectionTimeout
        * @see #executeMethod
        */
  -    public void setConnectionTimeout(int timeout)
  -    {
  +    public void setConnectionTimeout(int timeout) {
           this.timeoutConnection = timeout;
       }
   
  @@ -188,8 +184,7 @@
        * @return the connection timeout value
        * @see #setConnectionTimeout
        */
  -    public int getConnectionTimeout()
  -    {
  +    public int getConnectionTimeout() {
           return timeoutConnection;
       }
   
  @@ -201,8 +196,7 @@
        * @see #getRequestTimeout
        * @see HttpConnection#setSoTimeout
        */
  -    public void setRequestTimeout(int timeout)
  -    {
  +    public void setRequestTimeout(int timeout) {
           this.timeoutRequest = timeout;
       }
   
  @@ -212,8 +206,7 @@
        * @return the request timeout
        * @see setRequestTimeout
        */
  -    public int getRequestTimeout()
  -    {
  +    public int getRequestTimeout() {
           return timeoutRequest;
       }
   
  @@ -224,8 +217,7 @@
        * @param host The hostname of the HTTP proxy server
        * @see HttpConnectionManager#setProxyHost
        */
  -    public void setProxyHost(String host)
  -    {
  +    public void setProxyHost(String host) {
           mgr.setProxyHost(host);
       }
   
  @@ -236,8 +228,7 @@
        * @return the hostname of the HTTP proxy server
        * @see HttpConnectionManager#getProxyHost
        */
  -    public String getProxyHost()
  -    {
  +    public String getProxyHost() {
           return mgr.getProxyHost();
       }
   
  @@ -248,8 +239,7 @@
        * @param port the proxy server port number
        * @see HttpConnectionManager#setProxyPort
        */
  -    public void setProxyPort(int port)
  -    {
  +    public void setProxyPort(int port) {
           mgr.setProxyPort(port);
       }
   
  @@ -259,8 +249,7 @@
        * @return the HTTP proxy server port number
        * @see HttpConnectionManager#getProxyPort
        */
  -    public int getProxyPort()
  -    {
  +    public int getProxyPort() {
           return mgr.getProxyPort();
       }
   
  @@ -276,11 +265,10 @@
        * @throws HttpException if a protocol exception occurs
        *
        */
  -    public int executeMethod(HttpUrlMethod method) throws IOException, HttpException
  -    {
  +    public int executeMethod(HttpUrlMethod method) throws IOException, 
  +        HttpException {
   
  -        if (null == method)
  -        {
  +        if (null == method) {
               throw new NullPointerException("method parameter");
           }
   
  @@ -291,25 +279,18 @@
   
           method.setStrictMode(strictMode);
   
  -        try
  -        {
  +        try {
               status = method.execute(getState(), connection);
  -        }
  -        catch (IOException ex)
  -        {
  +        } catch (IOException ex) {
               throw ex;
  -        }
  -        catch (HttpException ex)
  -        {
  +        } catch (HttpException ex) {
               throw ex;
  -        }
  -        finally
  -        {
  +        } finally {
               mgr.releaseConnection(connection);
           }
   
  -        if (status == 301 || status == 302 || 
  -            status == 303 || status == 307) {
  +        if (status == 301 || status == 302
  +            || status == 303 || status == 307) {
               Header header = method.getResponseHeader("Location");
               String url = header.getValue();
               if (url == null) {
  
  
  

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


Mime
View raw message