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

Duration.getTimeInMillis: behaviour with very long duration 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 methods

        public final long getTimeInMillis(Calendar startInstant)
        public final long getTimeInMillis(Date startInstant)

        in the description of class javax.xml.datatype.Duration does not explicitly specify
        returned value if the duration is too long to be represented by a value of the returned
        type.
         
        Fields of duration may be much bigger than long type can represent, so for example
        PT100000000000000000000S (1e20 seconds) is a valid duration, which cannot fit in to the
        long type.

        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: