changeset 4547:812c6d4d6a58

6898310: (cs) Charset cache lookups should be synchronized Summary: synchronize the lookup in iterator Reviewed-by: alanb
author sherman
date Fri, 02 Sep 2011 10:20:08 -0700
parents ffada2ce20e5
children 95aff7cbf590
files src/share/classes/sun/nio/cs/AbstractCharsetProvider.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/nio/cs/AbstractCharsetProvider.java	Thu Sep 01 23:00:09 2011 -0700
+++ b/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() {