Refer to JDK-6937964, from Bug6937964Test, the following code throws ISE:
Duration duration = datatypeFactory.newDurationYearMonth("P1Y");
try {
QName xmlSchemaType = duration.getXMLSchemaType();
} catch (IllegalStateException illegalStateException) {
// TODO; this test really should pass
System.err.println("Please fix this bug that is being ignored, for now: " + illegalStateException.getMessage());
}
Duration duration = datatypeFactory.newDurationYearMonth("P1Y");
try {
QName xmlSchemaType = duration.getXMLSchemaType();
} catch (IllegalStateException illegalStateException) {
// TODO; this test really should pass
System.err.println("Please fix this bug that is being ignored, for now: " + illegalStateException.getMessage());
}