Codereview request for 6898310: (cs) Charset cache lookups should be synchronized

Rémi Forax forax at univ-mlv.fr
Fri Sep 2 13:40:03 UTC 2011


On 09/02/2011 03:17 PM, Ulf Zibis wrote:
> Am 02.09.2011 15:00, schrieb Rémi Forax:
>>
>> A way to solve the problem is to split AbstractCharsetProvider in two 
>> objects
>> i.e we should create a new object named CharsetProviderView that 
>> contains
>> deleteCharset() and charset() and provide this object as parameter of 
>> init.
>>
>> The idea is that during the initialization (in init()) calling 
>> deleteCharset/charset is safe,
>> not after.
>
> Calling deleteCharset/charset() from init() is completely superfluous.
> See my implementation********(Replacement of AbstractCharsetProvider) from
> *****Bug 100098* 
> <https://bugs.openjdk.java.net/show_bug.cgi?id=100098> - Make 
> sun.nio.cs.* charset objects light-weight**** :
> https://bugs.openjdk.java.net/attachment.cgi?id=131&action=diff#a/src/share/classes/sun/nio/cs/ExternalCharsetProvider.java_sec1
>

I agree, you can get ride of init(), but I would prefer to use a static 
block,
instead of a properties file.

> -Ulf
>

Rémi




More information about the core-libs-dev mailing list