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

Documentation of java.util.Calendar.set(int, int, int, int, int) refers to HOUR

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 7u75
    • core-libs

      A DESCRIPTION OF THE PROBLEM :
      set(int year, int month, int date, int hourOfDay, int minute, int second)
      Makes reference to HOUR instead of HOUR_OF_DAY


      Also affects documentation in previous versions but not version 8

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      "Sets the values for the fields YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY, MINUTE, and SECOND. Previous values of other fields are retained. If this is not desired, call clear() first."
      ACTUAL -
      "Sets the values for the fields YEAR, MONTH, DAY_OF_MONTH, HOUR, MINUTE, and SECOND. Previous values of other fields are retained. If this is not desired, call clear() first."

      URL OF FAULTY DOCUMENTATION :
      http://docs.oracle.com/javase/7/docs/api/java/util/Calendar.html#set(int,%20int,%20int,%20int,%20int,%20int)

            aefimov Aleksej Efimov
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: