commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbe...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods EntityEnclosingMethod.java
Date Sun, 13 Jul 2003 21:29:06 GMT
mbecke      2003/07/13 14:29:06

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        ConnectMethod.java HeaderElement.java
               httpclient/src/java/org/apache/commons/httpclient/auth
                        AuthChallengeParser.java
               httpclient/src/java/org/apache/commons/httpclient/util
                        DateParser.java ParameterParser.java
               httpclient/src/java/org/apache/commons/httpclient/cookie
                        CookieSpecBase.java RFC2109Spec.java
               httpclient/src/java/org/apache/commons/httpclient/methods
                        EntityEnclosingMethod.java
  Log:
  Fixed a few checkstyle violations.
  
  Revision  Changes    Path
  1.19      +7 -7      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ConnectMethod.java
  
  Index: ConnectMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ConnectMethod.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ConnectMethod.java	12 Jun 2003 18:38:59 -0000	1.18
  +++ ConnectMethod.java	13 Jul 2003 21:29:05 -0000	1.19
  @@ -71,7 +71,7 @@
   /**
    * <p>Wraps another method to tunnel through a proxy.</p>
    *
  - * @author Ortwin Glück
  + * @author Ortwin Gl�ck
    * @author dIon Gillard
    * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
  @@ -288,8 +288,8 @@
               if (connectionHeader != null) {
                   if (connectionHeader.getValue().equalsIgnoreCase("close")) {
                       if (LOG.isWarnEnabled()) {
  -                        LOG.warn("Invalid header encountered '" + connectionHeader.toExternalForm()
+
  -                            "' in response " + getStatusLine().toString());
  +                        LOG.warn("Invalid header encountered '" + connectionHeader.toExternalForm()

  +                        + "' in response " + getStatusLine().toString());
                       }
                   }
               }
  
  
  
  1.20      +6 -7      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HeaderElement.java
  
  Index: HeaderElement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HeaderElement.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- HeaderElement.java	13 Jul 2003 13:54:50 -0000	1.19
  +++ HeaderElement.java	13 Jul 2003 21:29:05 -0000	1.20
  @@ -165,7 +165,7 @@
           ParameterParser parser = new ParameterParser();
           List params = parser.parse(chars, offset, length, ';');
           if (params.size() > 0) {
  -            NameValuePair element = (NameValuePair)params.remove(0);
  +            NameValuePair element = (NameValuePair) params.remove(0);
               setName(element.getName());  
               setValue(element.getValue());
               if (params.size() > 0) {
  @@ -229,7 +229,7 @@
           int from = 0;
           int len = headerValue.length;
           boolean qouted = false;
  -        while(i < len) {
  +        while (i < len) {
               char ch = headerValue[i];
               if (ch == '"') {
                   qouted = !qouted;
  @@ -257,7 +257,6 @@
        * @param headerValue  the string representation of the header value
        *                     (as received from the web server).
        * @return array of {@link HeaderElement}s.
  -     * @throws HttpException if the above syntax rules are violated.
        */
       public static final HeaderElement[] parseElements(String headerValue) {
               
  
  
  
  1.6       +4 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/AuthChallengeParser.java
  
  Index: AuthChallengeParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/AuthChallengeParser.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AuthChallengeParser.java	13 Jul 2003 13:54:51 -0000	1.5
  +++ AuthChallengeParser.java	13 Jul 2003 21:29:05 -0000	1.6
  @@ -134,7 +134,7 @@
           List params = parser.parse(
               challengeStr.substring(idx + 1, challengeStr.length()), ',');
           for (int i = 0; i < params.size(); i++) {
  -            NameValuePair param = (NameValuePair)params.get(i);
  +            NameValuePair param = (NameValuePair) params.get(i);
               map.put(param.getName().toLowerCase(), param.getValue());
           }
           return map;
  
  
  
  1.5       +5 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/util/DateParser.java
  
  Index: DateParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/util/DateParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DateParser.java	13 Jul 2003 13:54:51 -0000	1.4
  +++ DateParser.java	13 Jul 2003 21:29:05 -0000	1.5
  @@ -149,8 +149,8 @@
           // see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5279
           if (dateValue.length() > 1 
               && dateValue.startsWith("'") 
  -            && dateValue.endsWith("'"))
  -        {
  +            && dateValue.endsWith("'")
  +        ) {
               dateValue = dateValue.substring (1, dateValue.length() - 1);
           }
           
  
  
  
  1.2       +4 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/util/ParameterParser.java
  
  Index: ParameterParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/util/ParameterParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParameterParser.java	13 Jul 2003 13:54:51 -0000	1.1
  +++ ParameterParser.java	13 Jul 2003 21:29:05 -0000	1.2
  @@ -117,9 +117,9 @@
           }
           // Strip away quotes if necessary
           if (quoted) {
  -            if (((i2 - i1) >= 2) && 
  -                (chars[i1] == '"') &&
  -                (chars[i2 - 1] == '"') ) {
  +            if (((i2 - i1) >= 2) 
  +                && (chars[i1] == '"') 
  +                && (chars[i2 - 1] == '"')) {
                   i1++;
                   i2--;
               }
  @@ -135,7 +135,7 @@
       /** Is given character present in the array of characters? */
       private boolean isOneOf(char ch, char[] charray) {
           boolean result = false;
  -        for (int i = 0; i < charray.length; i ++) {
  +        for (int i = 0; i < charray.length; i++) {
               if (ch == charray[i]) {
                   result = true;
                   break;
  @@ -241,7 +241,6 @@
           
           String paramName = null;
           String paramValue = null;
  -        boolean done = false;
           while (hasChar()) {
               paramName = parseToken(new char[] {'=', separator});
               paramValue = null;
  
  
  
  1.18      +4 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/CookieSpecBase.java
  
  Index: CookieSpecBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/CookieSpecBase.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- CookieSpecBase.java	13 Jul 2003 13:54:51 -0000	1.17
  +++ CookieSpecBase.java	13 Jul 2003 21:29:05 -0000	1.18
  @@ -189,7 +189,7 @@
               try {
                   DateParser.parseDate(header.substring(i1, i2));
                   isNetscapeCookie = true; 
  -            } catch(DateParseException e) {
  +            } catch (DateParseException e) {
                   // Does not look like a valid expiry date
               }
           }
  
  
  
  1.15      +4 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/RFC2109Spec.java
  
  Index: RFC2109Spec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/RFC2109Spec.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- RFC2109Spec.java	26 May 2003 17:58:03 -0000	1.14
  +++ RFC2109Spec.java	13 Jul 2003 21:29:06 -0000	1.15
  @@ -124,8 +124,7 @@
               }
               cookie.setPath(paramValue);
               cookie.setPathAttributeSpecified(true);
  -        }
  -        else if (paramName.equals("version")) {
  +        } else if (paramName.equals("version")) {
   
               if (paramValue == null) {
                   throw new MalformedCookieException(
  
  
  
  1.20      +6 -6      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/EntityEnclosingMethod.java
  
  Index: EntityEnclosingMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/EntityEnclosingMethod.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- EntityEnclosingMethod.java	5 Jul 2003 18:43:04 -0000	1.19
  +++ EntityEnclosingMethod.java	13 Jul 2003 21:29:06 -0000	1.20
  @@ -306,8 +306,8 @@
           LOG.trace("enter HttpMethodBase.addContentLengthRequestHeader("
                     + "HttpState, HttpConnection)");
   
  -        if ((getRequestHeader("content-length") == null) &&
  -            (getRequestHeader("Transfer-Encoding") == null)) {
  +        if ((getRequestHeader("content-length") == null) 
  +            && (getRequestHeader("Transfer-Encoding") == null)) {
               int len = getRequestContentLength();
               if (len >= 0) {
                   addRequestHeader("Content-Length", String.valueOf(len));
  
  
  

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


Mime
View raw message