<i18n dev> [8] RFR: 8013086 : NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied

Masayoshi Okutsu masayoshi.okutsu at oracle.com
Mon May 6 19:05:39 PDT 2013


Looks OK. There's still some room for optimization, though.

Masayoshi

On 5/2/2013 11:46 AM, Naoto Sato wrote:
> Webrev has been updated with your suggestion:
>
> http://cr.openjdk.java.net/~naoto/8013086/webrev.02/
>
> Naoto
>
> On 5/1/13 1:19 AM, Masayoshi Okutsu wrote:
>> What I meant is something like this.
>>
>> for (int i = 1; i <= 4; i++) {
>>      String name = tznp.getDisplayName(id, i>=3, i%2, locale);
>>      if (name == null) {
>>          switch (i) {
>>          case 1:
>>              return null;
>>          case 2:
>>              name = names[1];
>>              break;
>>          ...
>>          OR
>>          if (i == 0) {
>>              ....
>>
>> Otherwise, names[i] will be evaluated 4 times.
>>
>> Thanks,
>> Masayoshi
>>
>> On 4/27/2013 3:13 AM, Naoto Sato wrote:
>>> Thank you for the comment. Updated the fix (just moved the following
>>> if in front of the for-loop).
>>>
>>> http://cr.openjdk.java.net/~naoto/8013086/webrev.01/
>>>
>>> Naoto
>>>
>>> On 4/26/13 1:46 AM, Masayoshi Okutsu wrote:
>>>> I'd suggest that the for loop and the following if-statement be 
>>>> combined
>>>> and optimized.
>>>>
>>>> Masayoshi
>>>>
>>>> On 4/26/2013 6:21 AM, Naoto Sato wrote:
>>>>> Hello,
>>>>>
>>>>> Please review the fix for the following bug:
>>>>>
>>>>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8013086
>>>>>
>>>>> The fix is to complement the missing display names with the provided
>>>>> ones for TimeZoneNameProvider implementations.
>>>>>
>>>>> http://cr.openjdk.java.net/~naoto/8013086/webrev.00/
>>>>>
>>>>> Naoto
>>>>
>>>
>>
>



More information about the i18n-dev mailing list