The logic looks fine.

In the main code, this part
  .getLong(INSTANT_SECONDS);
can be replaced with
  .toEpochSecond();
which will be slightly faster.

In the test case, this part
 .plus(15, ChronoUnit.MINUTES);
can be replaced with
 .plusMinutes(15)

And
 .with(ChronoField.OFFSET_SECONDS,
ZoneOffset.of(offsetSamples[j]).getTotalSeconds())
can be replaced with
 .with(ZoneOffset.of(offsetSamples[j]))

In addition to the looping tests, I'd like to see the examples from
the bug report as test cases. Those tests would be simple to follow
and explain, whereas the looping tests are a little hard to follow.

thanks for fixing this
Stephen



On 9 December 2015 at 07:44, Ramanand Patil <ramanand.pa...@oracle.com> wrote:
> HI all,
>
>
>
> Please review a fix for Bug  - HYPERLINK 
> "https://bugs.openjdk.java.net/browse/JDK-8066982"JDK-8066982
>
>
>
> Bug - Parsing a string with ZonedDateTime.parse() that contains zone offset 
> and zone ID "Europe/Berlin" returns a wrong ZonedDateAndTime (different 
> offset). This error starts exactly at the transition time (included) and ends 
> one hour later (excluded).
>
>
>
> Webrev - http://cr.openjdk.java.net/~aefimov/8066982/webrev.00/
>
>
>
> One existing test case in TCKZonedDateTime.java is also modified, because - 
> when offset is invalid the local time is changed to make the result valid.
>
>
>
>
>
> Regards,
>
> Ramanand.

Reply via email to