DatatypeConverterInterface.printDate inconsistencies · Issue #761 · javaee/jaxb-v2 (original) (raw)

This repository was archived by the owner on Feb 5, 2019. It is now read-only.

This repository was archived by the owner on Feb 5, 2019. It is now read-only.

@glassfishrobot

Description

@glassfishrobot

There are two implementations of the DatatypeConverterInterface (one in jaxb-api
module and one in jaxb-impl module) and both of them have slightly different
printDate() implementations. The printDate in jaxb-api will include time zone
offset information but the printDate in jaxb-impl will not.

Additionally, the DatatypeConverterInterface implementation used in the jaxb-api
cannot be replaced by provider-specific one by calling
DatatypeConverter.setDatatypeConverter() as indicated by the javadoc. The
DatatypeConverterInterface implementation in jaxb-api cannot be replaced because
the "theConverter" constant in DatatypeConverter is never null (when called for
the very first time).

These issues cause problems when for example using some other JAXB
implementation with jaxb-api module or using JAXB RI with some other api module.

Environment

Operating System: All
Platform: All

Affected Versions

[2.2.1]