[ https://issues.apache.org/jira/browse/CONFIGURATION-767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory resolved CONFIGURATION-767. ------------------------------------------- Fix Version/s: 2.7 Resolution: Fixed In git master. > NullPointerException in XMLConfiguration#createTransformer() when no > FileLocator is set > --------------------------------------------------------------------------------------- > > Key: CONFIGURATION-767 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-767 > Project: Commons Configuration > Issue Type: Bug > Reporter: Gary D. Gregory > Priority: Major > Fix For: 2.7 > > > You get a {{NullPointerException}} in > {{XMLConfiguration#createTransformer()}} when no {{FileLocator}} is set. > For example: > {code:java} > XMLConfiguration xmlConfig = new XMLConfiguration(); > xmlConfig.setRootElementName("IAmRoot"); > StringWriter sw = new StringWriter(); > xmlConfig.write(sw); > {code} > Yields: > {noformat} > java.lang.NullPointerException > at > org.apache.commons.configuration2.XMLConfiguration.createTransformer(XMLConfiguration.java:884) > at > org.apache.commons.configuration2.XMLConfiguration.write(XMLConfiguration.java:1045) > ... > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)