RFR: 8247706: Unintentional use of new Date(year...) with absolute year
Roger Riggs
roger.riggs at oracle.com
Wed Jun 17 19:30:57 UTC 2020
Hi Martin,
Looks fine,
I'm embarrassed by the one in the java.time tests, we should have known
better.
Thanks, Roger
On 6/17/20 3:22 PM, Martin Buchholz wrote:
> No actual bugs fixed, but good to stamp out all instances of new Date(1970)
>
> 8247706: Unintentional use of new Date(year...) with absolute year
> https://cr.openjdk.java.net/~martin/webrevs/jdk/Date-constructor-1900/
> https://bugs.openjdk.java.net/browse/JDK-8247706
>
> The "1990" below looks like a simple typo:
>
> - Date d = new Date(2003 - 1990, OCTOBER, 31);
> + Date d = new Date(2003 - 1900, OCTOBER, 31);
More information about the core-libs-dev
mailing list