Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
N/A
Description
The DocumentBuilderFactoryImpl class has static methods that allow to switch between DOOM and the default DOM implementation as returned by JAXP. This was a hack introduced for Rampart. Recent versions of Rampart no longer rely on this hack. On the other hand usage of setDOOMRequired in a concurrent environment can lead to unexpected behavior and severe bugs, as shown in WSCOMMONS-210 and AXIS2-1570. Therefore we should get rid of this hack.
We should do this in a way that doesn't break existing code and with a clear migration path. The proposal is to first deprecate the related methods and to remove them altogether in the next major release.
One problem is the current implementation of newDocumentBuilder:
public DocumentBuilder newDocumentBuilder() throws ParserConfigurationException {
return isDOOMRequired() ? new DocumentBuilderImpl(this) : originalDocumentBuilderFactory.newDocumentBuilder();
}
Since isDOMMRequired returns false by default, this means that the current implementation of DocumentBuilderFactoryImpl can only be used in a meaningful way in conjunction with setDOOMRequired. This in turn implies that deprecation of setDOOMRequired is not sufficient.
Attachments
Issue Links
- is related to
-
AXIOM-3 NullPointerException in DocumentBuilderFactoryImpl
- Closed