Top Description Fields Constructors Methods
org.wildfly.common.xml

public final Class DocumentBuilderFactoryUtil

extends Object
Class Inheritance
Static Imports
javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, org.wildfly.common.xml.FactoryConstants.APACHE_DISALLOW_DOCTYPE_DECL, .FactoryConstants.APACHE_LOAD_EXTERNAL_DTD, .FactoryConstants.XML_EXTERNAL_GENERAL_ENTITIES, .FactoryConstants.XML_EXTERNAL_PARAMETER_ENTITIES, .Log.XML_FACTORY_LOGGER

Factory provides DocumentBuilderFactory with secure defaults set. Properties not supported generate a warning, but the factory process creation will continue and return a result. Settings based on recommendations of Sonarcloud RSPEC-2755 and OWASP XML External Entity Prevention Cheatsheet.

Author
Boris Unckel
Since
1.6.0.Final

Field Summary

Modifier and TypeField and Description
private static final AtomicBoolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static DocumentBuilderFactory

Returns:

an instance of the DocumentBuilderFactory.
create
()

Factory generated with secure defaults.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

TO_BE_LOGGEDback to summary
private static final AtomicBoolean TO_BE_LOGGED

Constructor Detail

DocumentBuilderFactoryUtilback to summary
private DocumentBuilderFactoryUtil()

No instance.

Method Detail

createback to summary
public static DocumentBuilderFactory create()

Factory generated with secure defaults.

Returns:DocumentBuilderFactory

an instance of the DocumentBuilderFactory.

Annotations
@NotNull