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

Duration.normalizeWith: 'a very large value' is not specified

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.3
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Name: erR10175 Date: 10/29/2003



          Documentation of the method

        javax.xml.datatype.Duration.normalizeWith(Calendar startTimeInstant)

        is not certain in specifying range of durations which can be reliably used with the
        method.

        The documentation reads:

        "Note that since the Calendar class uses int to hold the value of year and month,
        this method may produce an unexpected result if this duration object holds a very
        large value in the years or months fields." So it is not clear, when the results
        are reliable.

        The notion of the 'very large value' is not specified so it is not clear, when the
        results are reliable.

        To use that method we have to know exactly when they are reliable, otherwise
        we cannot trust any result. From compatibility point of view it's better to
        specify range that is required to be processed correctly in all implementations
        of JAXP 1.3

        The bug is found in the javadoc of jdk1.5.0/beta/b25

        ======================================================================

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                kkawagucsunw Kohsuke Kawaguchi (Inactive)
                Reporter:
                reysunw Rey Rey (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: