mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8319423: Improve Year.isLeap by checking divisibility by 16
Reviewed-by: naoto, rriggs
This commit is contained in:
parent
59e9981ec2
commit
7d25f1c6cb
6 changed files with 125 additions and 7 deletions
|
@ -475,7 +475,7 @@ public final class IsoChronology extends AbstractChronology implements Serializa
|
|||
*/
|
||||
@Override
|
||||
public boolean isLeapYear(long prolepticYear) {
|
||||
return ((prolepticYear & 3) == 0) && ((prolepticYear % 100) != 0 || (prolepticYear % 400) == 0);
|
||||
return Year.isLeap(prolepticYear);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue