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 URI.java
Date Tue, 01 Jul 2003 01:12:29 GMT
mbecke      2003/06/30 18:12:29

  Modified:    httpclient/src/java/org/apache/commons/httpclient URI.java
  Log:
  The URI is now correctly rebuilt after calling normalize().  This patch also includes a
couple
of style violations.
  PR: 21201
  
  Revision  Changes    Path
  1.36      +17 -15    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URI.java
  
  Index: URI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URI.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- URI.java	19 Jun 2003 23:28:19 -0000	1.35
  +++ URI.java	1 Jul 2003 01:12:29 -0000	1.36
  @@ -1982,16 +1982,16 @@
                   next = tmp.length();
               }
               if (!_is_abs_path) {
  -                if (!escaped && prevalidate(tmp.substring(from, next),
  -                            disallowed_rel_path) || escaped &&
  -                        validate(tmp.substring(from, next).toCharArray(),
  -                            rel_path)) {
  +                if (!escaped 
  +                    && prevalidate(tmp.substring(from, next), disallowed_rel_path)

  +                    || escaped 
  +                    && validate(tmp.substring(from, next).toCharArray(), rel_path))
{
                       // Set flag
                       _is_rel_path = true;
  -                } else if (!escaped && prevalidate(tmp.substring(from, next),
  -                            disallowed_opaque_part) || escaped &&
  -                        validate(tmp.substring(from, next).toCharArray(),
  -                            opaque_part)) {
  +                } else if (!escaped 
  +                    && prevalidate(tmp.substring(from, next), disallowed_opaque_part)

  +                    || escaped 
  +                    && validate(tmp.substring(from, next).toCharArray(), opaque_part))
{
                       // Set flag
                       _is_opaque_part = true;
                   } else {
  @@ -2492,7 +2492,7 @@
        * And each application should remember its own charset to support.
        *
        * @param charset the default charset for each protocol
  -     * @throws DefaultDefaultCharsetChanged default charset changed
  +     * @throws DefaultCharsetChanged default charset changed
        */
       public static void setDefaultProtocolCharset(String charset) 
           throws DefaultCharsetChanged {
  @@ -2531,8 +2531,9 @@
        * @see #getDefaultProtocolCharset
        */
       public String getProtocolCharset() {
  -        return (protocolCharset != null) ? protocolCharset :
  -            defaultProtocolCharset;
  +        return (protocolCharset != null) 
  +            ? protocolCharset 
  +            : defaultProtocolCharset;
       }
   
   
  @@ -3490,6 +3491,7 @@
        */
       public void normalize() throws URIException {
           _path = normalize(_path);
  +        setURI();
       }
   
   
  
  
  

---------------------------------------------------------------------
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