You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2019/11/03 23:36:27 UTC
[commons-configuration] branch master updated: Fix Checkstyle
issues.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git
The following commit(s) were added to refs/heads/master by this push:
new b9c56ac Fix Checkstyle issues.
b9c56ac is described below
commit b9c56acbe14c7ab2bdba2a7884be7bdd39096722
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Nov 3 18:36:23 2019 -0500
Fix Checkstyle issues.
---
.../org/apache/commons/configuration2/XMLConfiguration.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java b/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java
index 0248265..613162c 100644
--- a/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java
+++ b/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java
@@ -192,15 +192,15 @@ import org.xml.sax.helpers.DefaultHandler;
public class XMLConfiguration extends BaseHierarchicalConfiguration implements
FileBasedConfiguration, FileLocatorAware, InputStreamSupport
{
+ /** Constant for the default indent size. */
+ static final int DEFAULT_INDENT_SIZE = 2;
+
/** Constant for output property name used on a transformer to specify the indent amount. */
static final String INDENT_AMOUNT_PROPERTY = "{http://xml.apache.org/xslt}indent-amount";
/** Constant for the default root element name. */
private static final String DEFAULT_ROOT_NAME = "configuration";
- /** Constant for the default indent size. */
- static final int DEFAULT_INDENT_SIZE = 2;
-
/** Constant for the name of the space attribute.*/
private static final String ATTR_SPACE = "xml:space";
@@ -1054,13 +1054,14 @@ public class XMLConfiguration extends BaseHierarchicalConfiguration implements
/**
* Saves the configuration to the specified writer.
- *
+ *
* @param writer the writer used to save the configuration.
* @param transformer How to transform this configuration.
* @throws ConfigurationException if an error occurs.
* @since 2.7.0
*/
- public void write(final Writer writer, final Transformer transformer) throws ConfigurationException {
+ public void write(final Writer writer, final Transformer transformer) throws ConfigurationException
+ {
final Source source = new DOMSource(createDocument());
final Result result = new StreamResult(writer);
XMLDocumentHelper.transform(transformer, source, result);