[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-core-libs-dev
Subject:    Re: RFR:JDK-8066806:java.time.format.DateTimeFormatter cannot parse an offset with single digit hour
From:       nadeesh tv <nadeesh.tv () oracle ! com>
Date:       2016-05-31 17:55:19
Message-ID: 574DCF95.20904 () oracle ! com
[Download RAW message or body]

Hi Stephen,

Thanks for the suggestions and the code.

Regards,
Nadeesh

On 5/31/2016 7:15 PM, Stephen Colebourne wrote:
> Where the new patterns are described in Javadoc, there is no
> discussion of the difference between "H" and "HH".
>
> Add after </ul>
>
> "Patterns containing "HH" will format and parse a two digit hour,
> zero-padded if necessary. Patterns containing "H" will format with no
> zero-padding, and parse either one or two digits."
>
> "with colo" should be "with colon"
>
> As for the main code, I've had a go at a rewrite:
> https://gist.github.com/jodastephen/68857dd344e33bd6c0b3b4d24279d2e4
>
> It is completely untested, and surely has mistakes, however as a
> design it seems reasonable.
>
> I agree that the tests need to cover these cases:
>
> - offset at end of line
> - offset followed by letters
> - offset followed by numbers
>
> Stephen
>
>
> On 26 May 2016 at 08:49, nadeesh tv <nadeesh.tv@oracle.com> wrote:
>> Hi all,
>>
>> Please review
>>
>> BugId : https://bugs.openjdk.java.net/browse/JDK-8066806
>>
>> Issue: java.time.format.DateTimeFormatter cannot parse an offset with single
>> digit hour
>>
>> webrev:  http://cr.openjdk.java.net/~ntv/8066806/webrev.03/
>>
>> Solution: Added the suggested patterns but the parsing logic became too
>> complex.
>>   Appreciate any suggestion to make the  parsing less complicated
>>
>> --
>> Thanks and Regards,
>> Nadeesh TV
>>

-- 
Thanks and Regards,
Nadeesh TV

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic