Details
-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
1.3
-
generic
-
generic
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2098994 | 5.0 | Ramesh Mandava | P4 | Resolved | Fixed | rc |
Description
Name: erR10175 Date: 06/09/2004
There are two assertions in the spec (jdk15-b54) of the javax.xml.datatype package
that contradict to each other. The first one (see the overview of the class
XMLGregorianCalendar, right after the mapping table) states that DatatypeFactory
methods do not perform *validity* check:
"
All maximum value space constraints listed for the fields in the table above are
checked by factory methods, @{link DatatypeFactory},setter methods and parse methods
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
of this class. IllegalArgumentException is thrown when parameter's value is outside
the maximum value constraint for the field. Validation checks, for example, whether
days in month should be limited to 29, 30 or 31 days, that are dependent on the values
of other fields are not checked by these methods.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"
The second assertion occurs in the descriptions of several factory methods in the class
DatatypeFactory. That assertion implies that *validation* is performed by the factory
methods:
"
Throws:
IllegalArgumentException - If any individual parameter's value is outside the
maximum value constraint for the field as determined by the Date/Time Data Mapping
table in XMLGregorianCalendar or if the composite values constitute an invalid
XMLGregorianCalendar instance as determined by XMLGregorianCalendar.isValid().
"
It seems that the issue relates to moving creation methods to the DatatypeFactory
from the XMLGregorianCalendar (CCC 4997741). The bug
5040475: XMLGregorianCalendar factory and parse methods shouldn't validate instance
contains details of the issue history.
======================================================================
Attachments
Issue Links
- backported by
-
JDK-2098994 wrong DatatypeFactory mention in XMLGregorianCalendar spec
- Resolved
- relates to
-
JDK-5040475 XMLGregorianCalendar factory and parse methods shouldn't validate instance
- Resolved