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

Clarify the method description of Duration.toDaysPart()

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 18
    • core-libs
    • None
    • minimal
    • This is a javadoc change, so the risk is minimal.
    • Java API
    • SE

      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()}.

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

              Created:
              Updated:
              Resolved: