[threeten-dev] zidtext parser
Xueming Shen
xueming.shen at oracle.com
Fri Jan 25 08:07:54 PST 2013
On 1/25/13 3:34 AM, Stephen Colebourne wrote:
> Typo - "America/New_Work" -> America/New_York
>
> The argument should not be an array (310 doesn't use arrays in APIs).
> A Set looks more appropriate.
>
> Since you validate all the strings anyway, it looks like it would be
> best to pass in a Set<ZoneId>?
It was Set<ZoneId> at my first round, but I changed to String[] when I
realized
you have to write something like new HashMapArrays.asList(new
String[]{...}))
for the test case. Guess a straightforward String[] may be preferred.
But, yes
I can switched back to Set<ZoneId> if it fits the rest of 310 well.
>
> The internal variable in ZoneTextPrinterParser for the Set should be
> final for immutability.
>
> I tend to include the name of the data provider in the name of the
> method in the test case. So data_preferredZones() rather than
> provider_text()
>
> Stephen
>
>
> On 25 January 2013 01:40, Xueming Shen <xueming.shen at oracle.com> wrote:
>> The webrev has been changed to add an appendZoneText(style, String[]
>> preferredZones)
>> method to the builder. It works as expected so far.
>>
>> http://cr.openjdk.java.net/~sherman/jdk8_threeten/ztext_parser/
>>
>> The disadvantage is that the pattern formatter can't take advantage of this.
>> I'm not
>> sure if this "preferred zones" should go into formatter/parsecontext.
>>
>> -Sherman
More information about the threeten-dev
mailing list