Revert XMLHelper.java changed in TUP-21232. (#2217)

This commit is contained in:
Tao Tao
2019-01-22 19:20:24 +08:00
committed by Zhiwei Xue
parent 7827a3ead3
commit 4e2069f2f5

View File

@@ -20,13 +20,9 @@ public class XMLHelper {
private XMLReader reader;
private final String DISALLOW_DOCTYPE_DECL = "http://apache.org/xml/features/disallow-doctype-decl"; //$NON-NLS-1$
private XMLHelper() {
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
factory.setFeature(DISALLOW_DOCTYPE_DECL, true);
reader = factory.newSAXParser().getXMLReader();
reader.setErrorHandler(null);
} catch (SAXException e) {