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

Clarify the method description of Duration.toDaysPart()

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 18
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      This is a javadoc change, so the risk is minimal.
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Clarify the method description of Duration.toDaysPart()

      Problem

      The subject method has been added in JDK9, as well as other toXXXPart() methods. However the method description and its behavior is pretty much the same with toDays() method. Users may be confused without clarifying it.

      Solution

      The method has been added for its consistency with other toXXXPart() methods, so instead of deprecation, adding the explanation where its behavior is the same as toDays() method is appropriate.

      Specification

      Add the following @apiNote to the method desription of java.time.Duration.toDaysPart() method:

       * @apiNote
       * This method behaves exactly the same way as {@link #toDays()}.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              naoto Naoto Sato
              Reporter:
              webbuggrp Webbug Group
              Reviewed By:
              Brian Burkhalter, Iris Clark, Roger Riggs
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: