RFR: 8247706: Unintentional use of new Date(year...) with absolute year
Martin Buchholz
martinrb at google.com
Wed Jun 17 19:22:28 UTC 2020
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