commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tobr...@apache.org
Subject cvs commit: jakarta-commons/codec/src/java/org/apache/commons/codec/net URLCodec.java
Date Sun, 12 Oct 2003 02:17:11 GMT
tobrien     2003/10/11 19:17:11

  Modified:    codec/src/java/org/apache/commons/codec/net URLCodec.java
  Log:
  ENCODING was a static final variable, but it was only
  accessed from non-static methods.  This field was alter
  to be non-static and non-final.  A constructor was added to
  allow the end-user to set a custom Encoding.
  
  Revision  Changes    Path
  1.8       +10 -2     jakarta-commons/codec/src/java/org/apache/commons/codec/net/URLCodec.java
  
  Index: URLCodec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/net/URLCodec.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- URLCodec.java	5 Oct 2003 21:45:49 -0000	1.7
  +++ URLCodec.java	12 Oct 2003 02:17:11 -0000	1.8
  @@ -97,7 +97,7 @@
       /**
        * The <code>String</code> encoding used for decoding and encoding.
        */
  -    protected static final String ENCODING = "US-ASCII";
  +    protected String ENCODING = "US-ASCII";
       
       /**
        * BitSet of www-form-url safe characters.
  @@ -132,6 +132,14 @@
        */
       public URLCodec() {
           super();
  +    }
  +
  +    /**
  +     * Constructor which allows for the selection of an Encoding
  +     */
  +    public URLCodec(String encoding) {
  +        super();
  +        ENCODING = encoding;
       }
   
       /**
  
  
  

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