SAXParserFactoryFactory { public static SAXParserFactory newInstance() { final SAXParserFactory factory = SAXParserFactory.newInstance(); secureProcessing(factory); factory.setNamespaceAware(true); factory.setValidating(false); return factory; } private  SAXParserFactoryFactory(); static SAXParserFactory newInstance();  }
@Test void testExceedingTotalEntities() throws Exception { ParserConfig.secureProcessing = false; final SAXParserFactory factory = SAXParserFactoryFactory.newInstance(); final XMLReader xmlReader = factory.newSAXParser().getXMLReader(); xmlReader.parse(new InputSource(new XmlGenerator())); }