Codereview Request: 8011647: Add java.time.Instant methods to java.nio.file.attribute.FileTime

Alan Bateman Alan.Bateman at oracle.com
Fri Apr 12 11:10:44 PDT 2013


On 12/04/2013 18:28, Xueming Shen wrote:
>
> I'm not sure if the 3-digit unit fitting is "better" or not. But xml 
> spec cited in the
> toString() API specifies that the "trailing zeros are optional" in its 
> 3.2.3.1 "lexical
> representatin" section and "trailing zeros are prohibited..." in 
> 3.2.3.2 "canonical
> representation" section. So I think trimming trailing zeros in 
> FileTime.toString()
> is just fine.
The deviation and reference to the XML scheme spec was intended to be 
deal with the issues of year 0000 and > 9999. I'm happy with dropping 
the trailing zeros, I just wasn't sure if you suggesting that it would 
have been better to use 3-digit unit that allow trailing zeros.


> :
> Updated.
>
> http://cr.openjdk.java.net/~sherman/8011647/webrev/
>
Looks fine. The eqTime method is still printing to System.out in the 
test but it's not a big deal.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20130412/829a8933/attachment.html 


More information about the nio-dev mailing list