RFR: 8247706: Unintentional use of new Date(year...) with absolute year

naoto.sato at oracle.com naoto.sato at oracle.com
Wed Jun 17 19:33:33 UTC 2020


Thanks, Martin. +1

When you do the push, please update the copyright year to 2020.

Naoto

On 6/17/20 12:30 PM, Roger Riggs wrote:
> 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