I commited this, fixing a rather obvious bug (reported #9286).
2005-04-13 Sven de Marothy <[EMAIL PROTECTED]>
* java/nio/charset/Charset.java: Cached encoders shouldn't be static.
Index: java/nio/charset/Charset.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/nio/charset/Charset.java,v
retrieving revision 1.16
diff -u -r1.16 Charset.java
--- java/nio/charset/Charset.java 9 Apr 2005 03:21:27 -0000 1.16
+++ java/nio/charset/Charset.java 13 Apr 2005 13:16:25 -0000
@@ -62,23 +62,14 @@
*/
public abstract class Charset implements Comparable
{
- private static CharsetEncoder cachedEncoder;
- private static CharsetDecoder cachedDecoder;
+ private CharsetEncoder cachedEncoder;
+ private CharsetDecoder cachedDecoder;
/**
* Charset providers.
*/
private static CharsetProvider[] providers;
- static
- {
- synchronized (Charset.class)
- {
- cachedEncoder = null;
- cachedDecoder = null;
- }
- }
-
private final String canonicalName;
private final String[] aliases;
@@ -92,6 +83,8 @@
checkName (aliases[i]);
}
+ cachedEncoder = null;
+ cachedDecoder = null;
this.canonicalName = canonicalName;
this.aliases = aliases;
}
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches