-
Bug
-
Resolution: Fixed
-
P2
-
6u18
-
b09
-
sparc
-
solaris_10
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2193404 | 7 | Joe Wang | P3 | Resolved | Fixed | b112 |
JDK-2200220 | 6u23 | Vikram Aroskar | P2 | Resolved | Fixed | b02 |
JDK-2199480 | 6u22-rev | Vikram Aroskar | P2 | Closed | Fixed | b05 |
JDK-2198466 | 6u21-rev | Vikram Aroskar | P2 | Closed | Fixed | b08 |
JDK-2193403 | 1.4.0 | Joe Wang | P2 | Closed | Fixed | 1.4 |
XML DURATIONS DO NOT CONFORM TO W3C SPECIFICATIONS (Oracle Bug 9477446 )
Expected output:
Answer should be in canonical form, i.e. 21 years, 3 months.
Actual output:
20 years, 15 months.
This appears to be a bug in javax.xml.datatype.Duration or DatatypeFactory.
JDK: 6u18-b09 (latest)
/* test case */
import javax.xml.datatype.*;
public class Bug {
public static void main(String[] args) throws DatatypeConfigurationException {
DatatypeFactory dtf = DatatypeFactory.newInstance();
Duration d = dtf.newDuration("P20Y15M");
System.out.println(d.getYears()==21 ? "pass" : "fail");
}
}
Expected output:
Answer should be in canonical form, i.e. 21 years, 3 months.
Actual output:
20 years, 15 months.
This appears to be a bug in javax.xml.datatype.Duration or DatatypeFactory.
JDK: 6u18-b09 (latest)
/* test case */
import javax.xml.datatype.*;
public class Bug {
public static void main(String[] args) throws DatatypeConfigurationException {
DatatypeFactory dtf = DatatypeFactory.newInstance();
Duration d = dtf.newDuration("P20Y15M");
System.out.println(d.getYears()==21 ? "pass" : "fail");
}
}
- backported by
-
JDK-2200220 XML Duration do not conform to W3C specifications
- Resolved
-
JDK-2193404 XML Duration do not conform to W3C specifications
- Resolved
-
JDK-2193403 XML Duration do not conform to W3C specifications
- Closed
-
JDK-2198466 XML Duration do not conform to W3C specifications
- Closed
-
JDK-2199480 XML Duration do not conform to W3C specifications
- Closed