6898310: (cs) Charset cache lookups should be synchronized
Summary: synchronize the lookup in iterator
Reviewed-by: alanb
--- a/jdk/src/share/classes/sun/nio/cs/AbstractCharsetProvider.java Thu Sep 01 23:00:09 2011 -0700
+++ b/jdk/src/share/classes/sun/nio/cs/AbstractCharsetProvider.java Fri Sep 02 10:20:08 2011 -0700
@@ -179,7 +179,9 @@
public Charset next() {
String csn = i.next();
- return lookup(csn);
+ synchronized (AbstractCharsetProvider.this) {
+ return lookup(csn);
+ }
}
public void remove() {