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

Documentation - "copies" of value-based class objects

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      java.time.Duration::plusNanos and a lot of java.time methods have a similar part in their description:
      "Returns a copy of this duration with the specified duration in nanoseconds added."
      It is misleading, because such methods neither change nor even create a copy, but generally have a chain of new object constructions and nothing common between argument and result.
      Better description is possible. An example for this particular case:
      Returns a Duration object with added specified nanoseconds to original value.


            naoto Naoto Sato
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: