You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by mi...@apache.org on 2016/08/21 11:58:51 UTC

logging-log4j2 git commit: Fix method naming

Repository: logging-log4j2
Updated Branches:
  refs/heads/LOG4J2-1528 ce08bfbe4 -> b1e8f6f3e


Fix method naming


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/b1e8f6f3
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b1e8f6f3
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b1e8f6f3

Branch: refs/heads/LOG4J2-1528
Commit: b1e8f6f3e7758dfaa05c464e382530ddf89834e1
Parents: ce08bfb
Author: Mikael St�ldal <mi...@staldal.nu>
Authored: Sun Aug 21 13:58:45 2016 +0200
Committer: Mikael St�ldal <mi...@staldal.nu>
Committed: Sun Aug 21 13:58:45 2016 +0200

----------------------------------------------------------------------
 .../impl/DefaultConfigurationBuilder.java       | 26 ++++++++++----------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b1e8f6f3/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
index b32b037..47688f7 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
@@ -199,7 +199,7 @@ public class DefaultConfigurationBuilder<T extends BuiltConfiguration> implement
     public void writeXmlConfiguration(final OutputStream output) throws IOException {
         try {
             XMLStreamWriter xmlWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(output);
-            writeConfigurationXml(xmlWriter);
+            writeXmlConfiguration(xmlWriter);
             xmlWriter.close();
         } catch (XMLStreamException e) {
             if (e.getNestedException() instanceof IOException) {
@@ -215,7 +215,7 @@ public class DefaultConfigurationBuilder<T extends BuiltConfiguration> implement
         StringWriter sw = new StringWriter();
         try {
             XMLStreamWriter xmlWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(sw);
-            writeConfigurationXml(xmlWriter);
+            writeXmlConfiguration(xmlWriter);
             xmlWriter.close();
         } catch (XMLStreamException e) {
             throw new RuntimeException(e);
@@ -223,7 +223,7 @@ public class DefaultConfigurationBuilder<T extends BuiltConfiguration> implement
         return sw.toString();
     }
 
-    private void writeConfigurationXml(XMLStreamWriter xmlWriter) throws XMLStreamException {
+    private void writeXmlConfiguration(XMLStreamWriter xmlWriter) throws XMLStreamException {
         xmlWriter.writeStartDocument();
         xmlWriter.writeCharacters(System.lineSeparator());
 
@@ -257,7 +257,7 @@ public class DefaultConfigurationBuilder<T extends BuiltConfiguration> implement
 
         for (Component component : root.getComponents()) {
             if (!component.getAttributes().isEmpty() || !component.getComponents().isEmpty() || component.getValue() != null) {
-                writeComponentXml(xmlWriter, component, 1);
+                writeXmlComponent(xmlWriter, component, 1);
             }
         }
 
@@ -267,35 +267,35 @@ public class DefaultConfigurationBuilder<T extends BuiltConfiguration> implement
         xmlWriter.writeEndDocument();
     }
 
-    private void writeComponentXml(XMLStreamWriter xmlWriter, Component component, int nesting) throws XMLStreamException {
+    private void writeXmlComponent(XMLStreamWriter xmlWriter, Component component, int nesting) throws XMLStreamException {
         if (!component.getComponents().isEmpty() || component.getValue() != null) {
-            indentXml(xmlWriter, nesting);
+            writeXmlIndent(xmlWriter, nesting);
             xmlWriter.writeStartElement(component.getPluginType());
-            writeAttributesXml(xmlWriter, component);
+            writeXmlAttributes(xmlWriter, component);
             xmlWriter.writeCharacters(System.lineSeparator());
             for (Component subComponent : component.getComponents()) {
-                writeComponentXml(xmlWriter, subComponent, nesting + 1);
+                writeXmlComponent(xmlWriter, subComponent, nesting + 1);
             }
             if (component.getValue() != null) {
                 xmlWriter.writeCharacters(component.getValue());
             }
-            indentXml(xmlWriter, nesting);
+            writeXmlIndent(xmlWriter, nesting);
             xmlWriter.writeEndElement();
         } else {
-            indentXml(xmlWriter, nesting);
+            writeXmlIndent(xmlWriter, nesting);
             xmlWriter.writeEmptyElement(component.getPluginType());
-            writeAttributesXml(xmlWriter, component);
+            writeXmlAttributes(xmlWriter, component);
         }
         xmlWriter.writeCharacters(System.lineSeparator());
     }
 
-    private void indentXml(XMLStreamWriter xmlWriter, int nesting) throws XMLStreamException {
+    private void writeXmlIndent(XMLStreamWriter xmlWriter, int nesting) throws XMLStreamException {
         for (int i = 0; i < nesting; i++) {
             xmlWriter.writeCharacters("\t");
         }
     }
 
-    private void writeAttributesXml(XMLStreamWriter xmlWriter, Component component) throws XMLStreamException {
+    private void writeXmlAttributes(XMLStreamWriter xmlWriter, Component component) throws XMLStreamException {
         for (Map.Entry<String, String> attribute : component.getAttributes().entrySet()) {
             xmlWriter.writeAttribute(attribute.getKey(), attribute.getValue());
         }