Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8076441

Dead code in java.time.chrono.Chronology.isLeapYear after fixing JDK-8067800

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b59

      Backports

        Description

        The assignment to epochMonth in java/time/chrono/HijrahChronology.java is a dead code. It happened after following fix https://bugs.openjdk.java.net/browse/JDK-8067800

         public boolean isLeapYear(long prolepticYear) {
                 checkCalendarInit();
                if (prolepticYear < getMinimumYear() || prolepticYear > getMaximumYear()) {
                    return false;
              }
                 int epochMonth = yearToEpochMonth((int) prolepticYear);
                int len = getYearLength((int) prolepticYear);
                 return (len > 354);
             }

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ntv Nadeesh Tv
                  Reporter:
                  ntv Nadeesh Tv
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: