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

public final Class XMLReaderFactoryUtil

extends Object
Class Inheritance
Static Imports
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 XMLReaderFactory 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
XMLReaderFactoryUtil()

No instance.

Method Summary

Modifier and TypeMethod and Description
public static XMLReader

Returns:

an instance of the XMLInputFactory.
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

XMLReaderFactoryUtilback to summary
private XMLReaderFactoryUtil()

No instance.

Method Detail

createback to summary
public static XMLReader create() throws SAXException

Factory generated with secure defaults.

Returns:XMLReader

an instance of the XMLInputFactory.

Annotations
@NotNull