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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • core-libs
    • 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

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

                Dates

                  Created:
                  Updated:
                  Resolved: