In any case I think DatatypeFactory is really poor both in terms of
performance and usability. It's just ridiculous that you have to do
this much:
try {
DatatypeFactory.newInstance().newXMLGregorianCalendar(...);
} catch(DatatypeConfigurationException e) {
// huh?
assert false;
}
just to get a new XMLGregorianCalendar created.
I think a better bug to file (instead of the performance bug) is to
ask the JAXP API to deprecate this, and move the similar
functionality to something like this:
static XMLGregorianCalendar.create(....)
... which can use a singleton DatatypeFactory instance behind the
scene. This is faster as well as easier to use.
performance and usability. It's just ridiculous that you have to do
this much:
try {
DatatypeFactory.newInstance().newXMLGregorianCalendar(...);
} catch(DatatypeConfigurationException e) {
// huh?
assert false;
}
just to get a new XMLGregorianCalendar created.
I think a better bug to file (instead of the performance bug) is to
ask the JAXP API to deprecate this, and move the similar
functionality to something like this:
static XMLGregorianCalendar.create(....)
... which can use a singleton DatatypeFactory instance behind the
scene. This is faster as well as easier to use.