Codereview request for 6898310: (cs) Charset cache lookups should be synchronized
forax at univ-mlv.fr
Fri Sep 2 04:17:46 PDT 2011
On 09/02/2011 12:51 PM, Alan Bateman wrote:
> Xueming Shen wrote:
>> This is a forward porting. Same fix has been in jdk5/6, and will be
>> in jdk 7u2 later.
>> The change itself is relative simple. And given its race-condition
>> nature, no reliable
>> regression test case is provided.
> This looks okay to me.
Arghhh, next() can return null !
CharsetProvider provider = ...
Iterator<Charset> it = provider.charsets();
Iterator<Charset> it2 = provider.charsets();
Charset charset = it.next();
System.out.println(it2.next()); // print null
even if I'm not sure a lot of CharsetProvider actually calls deleteCharset
there is a possible bug here.
More information about the core-libs-dev