Skip to content

Commit d09530a

Browse files
committed
Applying Sebb's patch - CODEC-70 - to improve thread safety
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@672992 13f79535-47bb-0310-9956-ffa450edef68
1 parent 5b74e6d commit d09530a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/java/org/apache/commons/codec/net/URLCodec.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ public class URLCodec implements BinaryEncoder, BinaryDecoder, StringEncoder, St
5353
/**
5454
* The default charset used for string decoding and encoding.
5555
*/
56-
protected String charset = CharacterEncodingNames.UTF8;
56+
protected final String charset;
5757

58-
protected static byte ESCAPE_CHAR = '%';
58+
protected static final byte ESCAPE_CHAR = '%';
5959
/**
6060
* BitSet of www-form-url safe characters.
6161
*/
@@ -88,7 +88,7 @@ public class URLCodec implements BinaryEncoder, BinaryDecoder, StringEncoder, St
8888
* Default constructor.
8989
*/
9090
public URLCodec() {
91-
super();
91+
this(CharacterEncodingNames.UTF8);
9292
}
9393

9494
/**

0 commit comments

Comments
 (0)