logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1501757 - in /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core: config/ helpers/ pattern/
Date Wed, 10 Jul 2013 13:13:41 GMT
Author: ggregory
Date: Wed Jul 10 13:13:40 2013
New Revision: 1501757

URL: http://svn.apache.org/r1501757
Log:
Replace StringBuffer with StringBuilder. Also fix comments and Javadocs.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/OptionConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Transform.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LevelPatternConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LineLocationPatternConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MarkerPatternConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MethodLocationPatternConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/NDCPatternConverter.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java?rev=1501757&r1=1501756&r2=1501757&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
Wed Jul 10 13:13:40 2013
@@ -285,7 +285,7 @@ public class XMLConfiguration extends Ba
 
     private void constructHierarchy(final Node node, final Element element) {
         processAttributes(node, element);
-        final StringBuffer buffer = new StringBuffer();
+        final StringBuilder buffer = new StringBuilder();
         final NodeList list = element.getChildNodes();
         final List<Node> children = node.getChildren();
         for (int i = 0; i < list.getLength(); i++) {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/OptionConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/OptionConverter.java?rev=1501757&r1=1501756&r2=1501757&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/OptionConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/OptionConverter.java
Wed Jul 10 13:13:40 2013
@@ -55,7 +55,7 @@ public final class OptionConverter {
     public static String convertSpecialChars(final String s) {
         char c;
         final int len = s.length();
-        final StringBuffer sbuf = new StringBuffer(len);
+        final StringBuilder sbuf = new StringBuilder(len);
 
         int i = 0;
         while (i < len) {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Transform.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Transform.java?rev=1501757&r1=1501756&r2=1501757&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Transform.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Transform.java
Wed Jul 10 13:13:40 2013
@@ -52,7 +52,7 @@ public final class Transform {
             return input;
         }
 
-        //Use a StringBuffer in lieu of String concatenation -- it is
+        //Use a StringBuilder in lieu of String concatenation -- it is
         //much more efficient this way.
 
         final StringBuilder buf = new StringBuilder(input.length() + 6);
@@ -82,7 +82,7 @@ public final class Transform {
      * Ensures that embedded CDEnd strings (]]>) are handled properly
      * within message, NDC and throwable tag text.
      *
-     * @param buf StringBuffer holding the XML data to this point.  The
+     * @param buf StringBuilder holding the XML data to this point.  The
      *            initial CDStart (<![CDATA[) and final CDEnd (]]>) of the CDATA
      *            section are the responsibility of the calling method.
      * @param str The String that is inserted into an existing CDATA Section within buf.

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java?rev=1501757&r1=1501756&r2=1501757&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java
Wed Jul 10 13:13:40 2013
@@ -25,7 +25,7 @@ import org.apache.logging.log4j.core.con
 
 
 /**
- * Convert and format the event's date in a StringBuffer.
+ * Convert and format the event's date in a StringBuilder.
  */
 @Plugin(name = "DatePatternConverter", category = "Converter")
 @ConverterKeys({"d", "date" })

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LevelPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LevelPatternConverter.java?rev=1501757&r1=1501756&r2=1501757&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LevelPatternConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LevelPatternConverter.java
Wed Jul 10 13:13:40 2013
@@ -23,7 +23,7 @@ import org.apache.logging.log4j.core.Log
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 
 /**
- * Returns the event's level in a StringBuffer.
+ * Returns the event's level in a StringBuilder.
  */
 @Plugin(name = "LevelPatternConverter", category = "Converter")
 @ConverterKeys({"p", "level" })

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LineLocationPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LineLocationPatternConverter.java?rev=1501757&r1=1501756&r2=1501757&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LineLocationPatternConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LineLocationPatternConverter.java
Wed Jul 10 13:13:40 2013
@@ -20,7 +20,7 @@ import org.apache.logging.log4j.core.Log
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 
 /**
- * Returns the event's line location information in a StringBuffer.
+ * Returns the event's line location information in a StringBuilder.
  */
 @Plugin(name = "LineLocationPatternConverter", category = "Converter")
 @ConverterKeys({"L", "line" })

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MarkerPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MarkerPatternConverter.java?rev=1501757&r1=1501756&r2=1501757&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MarkerPatternConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MarkerPatternConverter.java
Wed Jul 10 13:13:40 2013
@@ -21,7 +21,7 @@ import org.apache.logging.log4j.core.Log
 import org.apache.logging.log4j.core.config.plugins.Plugin;
 
 /**
- * Returns the event's rendered message in a StringBuffer.
+ * Returns the event's rendered message in a StringBuilder.
  */
 @Plugin(name = "MarkerPatternConverter", category = "Converter")
 @ConverterKeys({"marker" })

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java?rev=1501757&r1=1501756&r2=1501757&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java
Wed Jul 10 13:13:40 2013
@@ -23,7 +23,7 @@ import org.apache.logging.log4j.message.
 import org.apache.logging.log4j.message.MultiformatMessage;
 
 /**
- * Returns the event's rendered message in a StringBuffer.
+ * Returns the event's rendered message in a StringBuilder.
  */
 @Plugin(name = "MessagePatternConverter", category = "Converter")
 @ConverterKeys({"m", "msg", "message" })

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MethodLocationPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MethodLocationPatternConverter.java?rev=1501757&r1=1501756&r2=1501757&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MethodLocationPatternConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/MethodLocationPatternConverter.java
Wed Jul 10 13:13:40 2013
@@ -21,7 +21,7 @@ import org.apache.logging.log4j.core.con
 
 
 /**
- * Returns the event's line location information in a StringBuffer.
+ * Returns the event's line location information in a StringBuilder.
  */
 @Plugin(name = "MethodLocationPatternConverter", category = "Converter")
 @ConverterKeys({"M", "method" })

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/NDCPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/NDCPatternConverter.java?rev=1501757&r1=1501756&r2=1501757&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/NDCPatternConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/NDCPatternConverter.java
Wed Jul 10 13:13:40 2013
@@ -21,7 +21,7 @@ import org.apache.logging.log4j.core.con
 
 
 /**
- * Returns the event's NDC in a StringBuffer.
+ * Returns the event's NDC in a StringBuilder.
  */
 @Plugin(name = "NDCPatternConverter", category = "Converter")
 @ConverterKeys({"x", "NDC" })



Mime
View raw message