[
https://issues.apache.org/jira/browse/CONFIGURATION-585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14063992#comment-14063992
]
Oliver Heger commented on CONFIGURATION-585:
--------------------------------------------
Any feedback on this one? I tend to close this ticket as invalid because I have
no clue what you are after.
> Hardcoded Parameters prevents correct initialisation of XML DocumentBuilder
> ---------------------------------------------------------------------------
>
> Key: CONFIGURATION-585
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-585
> Project: Commons Configuration
> Issue Type: Bug
> Components: File reloading
> Affects Versions: 1.8
> Environment: JDK 1.7.0.45
> MvN 3.0.5
> Reporter: Martin Gainty
> Priority: Blocker
> Labels: XMLConfiguration
> Fix For: 2.0
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> XMLConfiguration:
> protected DocumentBuilder createDocumentBuilder()
> throws ParserConfigurationException
> {
> if (getDocumentBuilder() != null)
> {
> return getDocumentBuilder();
> }
> else
> {
> DocumentBuilderFactory factory = DocumentBuilderFactory
> .newInstance();
> if (isValidating())
> {
> factory.setValidating(true);
> if (isSchemaValidation())
> {
> factory.setNamespaceAware(true);
> factory.setAttribute(JAXP_SCHEMA_LANGUAGE,
> W3C_XML_SCHEMA);
> }
> }
> DocumentBuilder result = factory.newDocumentBuilder();
> result.setEntityResolver(this.entityResolver);
> if (isValidating())
> {
> // register an error handler which detects validation errors
> result.setErrorHandler(new DefaultHandler()
> {
> @Override
> public void error(SAXParseException ex) throws
> SAXException
> {
> throw ex;
> }
> });
> }
> return result;
> }
> }
> There is no way to externally set any of these parameters
> I propose 2 changes
> 1)read properties from pom.xml
> 2)morph this into a XMLConfigurationPlugin which will run goal to set the
> params from configuration for new commons-configuration-plugin
> (Bug originally reported by Ron DiFrango from CapitalOne)
> Martin Gainty
> 11 July 2014
--
This message was sent by Atlassian JIRA
(v6.2#6252)