<i18n dev> RFR: JDK-8087104: DateFormatSymbols triggers this.clone() in the constructor
yuka.kamiya at oracle.com
Wed Mar 2 07:52:13 UTC 2016
Your fix looks good to me.
On 2016/03/02 14:34, Ramanand Patil wrote:
> Hi all,
> May I request one more review for this bug?
> [Thank you Masayoshi for your review.]
> -----Original Message-----
> From: Masayoshi Okutsu
> Sent: Wednesday, February 24, 2016 1:46 PM
> To: Ramanand Patil; i18n-dev at openjdk.java.net
> Cc: core-libs-dev at openjdk.java.net
> Subject: Re: RFR: JDK-8087104: DateFormatSymbols triggers this.clone() in the constructor
> Looks good to me.
> On 2/24/2016 4:40 PM, Ramanand Patil wrote:
>> Hi all,
>> Please review the fix for bug: https://bugs.openjdk.java.net/browse/JDK-8087104
>> Bug Description: DateFormatSymbols caches its own instance and calls this.clone() in the constructor. Because of this, any subclass implementation (which expects a field is always initialized to non-null in the constructor) will throw NPE in its overridden clone() method while using any instance variables which it assumed are initilaized in its contructor.
>> Webrev: http://cr.openjdk.java.net/~rpatil/8087104/webrev.00/
>> Fix: Instead of using its own instance for caching and calling clone in DateFormatSymbols, a nested class SymbolsCacheEntry is introduced.
More information about the i18n-dev