Package com.puppycrawl.tools.checkstyle
Class XmlLoader.LoadExternalDtdFeatureProvider
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.XmlLoader.LoadExternalDtdFeatureProvider
-
- Enclosing class:
- XmlLoader
public static final class XmlLoader.LoadExternalDtdFeatureProvider extends java.lang.ObjectUsed for setting specific for secure java installations features to SAXParserFactory. Pulled out as a separate class in order to suppress Pitest mutations.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringENABLE_EXTERNAL_DTD_LOADSystem property name to enable external DTD load.static java.lang.StringEXTERNAL_GENERAL_ENTITIESFeature that enables including external general entities in XML files.static java.lang.StringEXTERNAL_PARAMETER_ENTITIESFeature that enables including external parameter entities in XML files.static java.lang.StringLOAD_EXTERNAL_DTDFeature that enables loading external DTD when loading XML files.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsetFeaturesBySystemProperty(javax.xml.parsers.SAXParserFactory factory)Configures SAXParserFactory with features required to use external DTD file loading, this is not activated by default to no allow usage of schema files that checkstyle do not know it is even security problem to allow files from outside.
-
-
-
Field Detail
-
ENABLE_EXTERNAL_DTD_LOAD
public static final java.lang.String ENABLE_EXTERNAL_DTD_LOAD
System property name to enable external DTD load.- See Also:
- Constant Field Values
-
LOAD_EXTERNAL_DTD
public static final java.lang.String LOAD_EXTERNAL_DTD
Feature that enables loading external DTD when loading XML files.- See Also:
- Constant Field Values
-
EXTERNAL_GENERAL_ENTITIES
public static final java.lang.String EXTERNAL_GENERAL_ENTITIES
Feature that enables including external general entities in XML files.- See Also:
- Constant Field Values
-
EXTERNAL_PARAMETER_ENTITIES
public static final java.lang.String EXTERNAL_PARAMETER_ENTITIES
Feature that enables including external parameter entities in XML files.- See Also:
- Constant Field Values
-
-
Method Detail
-
setFeaturesBySystemProperty
public static void setFeaturesBySystemProperty(javax.xml.parsers.SAXParserFactory factory) throws org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationExceptionConfigures SAXParserFactory with features required to use external DTD file loading, this is not activated by default to no allow usage of schema files that checkstyle do not know it is even security problem to allow files from outside.- Parameters:
factory- factory to be configured with special features- Throws:
org.xml.sax.SAXException- if an error occursjavax.xml.parsers.ParserConfigurationException- if an error occurs
-
-