Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2076573 | 5.0 | Kohsuke Kawaguchi | P4 | Closed | Fixed | b30 |
Name: erR10175 Date: 10/30/2003
The documentation of the method
javax.xml.datatype.Duration.addTo(Calendar calendar)
is not clear about whether the milliseconds field of Calendar
object is affected by the method.
The documentation reads:
"Calls Calendar.add(int,int) in the order of YEARS, MONTHS, DAYS,
HOURS, MINUTES, and SECONDS if those fields are present.".
The class Calendar has fields correspondent to the enumerated ones
of the class Duration. But the Duration.SECONDS field correspond to
two different fields Calendar.MILLISECOND and Calendar.SECOND.
So it is not clear from the documentation, whether the method
Calendar.add(int, int) is called separately for the fields
Calendar.MILLISECOND and Calendar.SECOND with correspondent integer
and fraction parts of Duration.SECONDS (in which order?) or only
once for Calendar.SECOND with discarded fraction part of the field
Duration.SECONDS.
The bug is found in the javadoc of jdk1.5.0/beta/b25
======================================================================
The documentation of the method
javax.xml.datatype.Duration.addTo(Calendar calendar)
is not clear about whether the milliseconds field of Calendar
object is affected by the method.
The documentation reads:
"Calls Calendar.add(int,int) in the order of YEARS, MONTHS, DAYS,
HOURS, MINUTES, and SECONDS if those fields are present.".
The class Calendar has fields correspondent to the enumerated ones
of the class Duration. But the Duration.SECONDS field correspond to
two different fields Calendar.MILLISECOND and Calendar.SECOND.
So it is not clear from the documentation, whether the method
Calendar.add(int, int) is called separately for the fields
Calendar.MILLISECOND and Calendar.SECOND with correspondent integer
and fraction parts of Duration.SECONDS (in which order?) or only
once for Calendar.SECOND with discarded fraction part of the field
Duration.SECONDS.
The bug is found in the javadoc of jdk1.5.0/beta/b25
======================================================================
- backported by
-
JDK-2076573 Duration.addTo: ambiguity about milliseconds
- Closed