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);
             }

          Issue Links

            Activity

            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/91deecaf2d70
            User: rriggs
            Date: 2015-04-02 18:34:15 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/91deecaf2d70 User: rriggs Date: 2015-04-02 18:34:15 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/91deecaf2d70
            User: lana
            Date: 2015-04-08 21:37:52 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/91deecaf2d70 User: lana Date: 2015-04-08 21:37:52 +0000

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: