On 09/02/2011 12:51 PM, Alan Bateman wrote:
Xueming Shen wrote:
Hi,

This is a forward porting. Same fix has been in jdk5/6, and will be in jdk 7u2 later.

http://cr.openjdk.java.net/~sherman/6898310/webrev

The change itself is relative simple. And given its race-condition nature, no reliable
regression test case is provided.
This looks okay to me.

-Alan.

Arghhh, next() can return null !

CharsetProvider provider = ...
Iterator<Charset> it = provider.charsets();
Iterator<Charset> it2 = provider.charsets();
Charset charset = it.next();
provider.deleteCharset(charset.name(), ...)
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.

cheers,
Rémi


Reply via email to