mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
6560981: (cal) unused local variables in GregorianCalendar, etc.
Reviewed-by: naoto, bchristi, iris
This commit is contained in:
parent
5dd851d872
commit
d4c9a88073
3 changed files with 3 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -494,7 +494,7 @@ public abstract class BaseCalendar extends AbstractCalendar {
|
|||
*/
|
||||
final int getGregorianYearFromFixedDate(long fixedDate) {
|
||||
long d0;
|
||||
int d1, d2, d3, d4;
|
||||
int d1, d2, d3;
|
||||
int n400, n100, n4, n1;
|
||||
int year;
|
||||
|
||||
|
@ -507,7 +507,6 @@ public abstract class BaseCalendar extends AbstractCalendar {
|
|||
n4 = d2 / 1461;
|
||||
d3 = d2 % 1461;
|
||||
n1 = d3 / 365;
|
||||
d4 = (d3 % 365) + 1;
|
||||
} else {
|
||||
d0 = fixedDate - 1;
|
||||
n400 = (int)CalendarUtils.floorDivide(d0, 146097L);
|
||||
|
@ -517,7 +516,6 @@ public abstract class BaseCalendar extends AbstractCalendar {
|
|||
n4 = CalendarUtils.floorDivide(d2, 1461);
|
||||
d3 = CalendarUtils.mod(d2, 1461);
|
||||
n1 = CalendarUtils.floorDivide(d3, 365);
|
||||
d4 = CalendarUtils.mod(d3, 365) + 1;
|
||||
}
|
||||
year = 400 * n400 + 100 * n100 + 4 * n4 + n1;
|
||||
if (!(n100 == 4 || n1 == 4)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue