logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1396696 - in /logging/log4j/log4j2/trunk: api/src/main/java/org/apache/logging/log4j/message/ api/src/test/java/org/apache/logging/log4j/ core/src/main/java/org/apache/logging/log4j/core/appender/ core/src/main/java/org/apache/logging/log4...
Date Wed, 10 Oct 2012 17:09:08 GMT
Author: ggregory
Date: Wed Oct 10 17:09:07 2012
New Revision: 1396696

URL: http://svn.apache.org/viewvc?rev=1396696&view=rev
Log:
In most cases, do not use a String for ".", we can just use a char '.'.

Modified:
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/Timer.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/GZCompressAction.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/ZipCompressAction.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/DebugDisabledPerformanceComparison.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/PerformanceComparison.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/Timer.java
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
(original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
Wed Oct 10 17:09:07 2012
@@ -259,7 +259,7 @@ public class LocalizedMessage extends Pa
 
         String substr = key;
         int i;
-        while (rb == null && (i = substr.lastIndexOf(".")) > 0) {
+        while (rb == null && (i = substr.lastIndexOf('.')) > 0) {
             substr = substr.substring(0, i);
             try {
                 if (locale != null) {

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/Timer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/Timer.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/Timer.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/Timer.java Wed Oct
10 17:09:07 2012
@@ -182,7 +182,7 @@ public class Timer implements Serializab
 
             DecimalFormat numFormat = null;
             numFormat = new DecimalFormat("#0");
-            elapsed += numFormat.format(seconds) + ".";
+            elapsed += numFormat.format(seconds) + '.';
             numFormat = new DecimalFormat("000000000");
             elapsed += numFormat.format(nanoseconds) + " seconds";
             result.append(" stopped. Elapsed time: ").append(elapsed);
@@ -214,7 +214,7 @@ public class Timer implements Serializab
                 }
 
                 numFormat = new DecimalFormat("#0");
-                elapsed += numFormat.format(seconds) + ".";
+                elapsed += numFormat.format(seconds) + '.';
                 numFormat = new DecimalFormat("000000000");
                 elapsed += numFormat.format(nanoseconds) + " seconds";
                 result.append(" Average per iteration: ").append(elapsed);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSQueueAppender.java
Wed Oct 10 17:09:07 2012
@@ -85,7 +85,7 @@ public final class JMSQueueAppender exte
                                                   @PluginElement("filter") Filter filter,
                                                   @PluginAttr("suppressExceptions") String
suppress) {
 
-        String name = "JMSQueue" + factoryBindingName + "." + queueBindingName;
+        String name = "JMSQueue" + factoryBindingName + '.' + queueBindingName;
         boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
         JMSQueueManager manager = JMSQueueManager.getJMSQueueManager(factoryName, providerURL,
urlPkgPrefixes,
             securityPrincipalName, securityCredentials, factoryBindingName, queueBindingName,
userName, password);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/JMSTopicAppender.java
Wed Oct 10 17:09:07 2012
@@ -85,7 +85,7 @@ public final class JMSTopicAppender exte
                                                   @PluginElement("filters") Filter filter,
                                                   @PluginAttr("suppressExceptions") String
suppress) {
 
-        String name = "JMSTopic" + factoryBindingName + "." + topicBindingName;
+        String name = "JMSTopic" + factoryBindingName + '.' + topicBindingName;
         boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
         JMSTopicManager manager = JMSTopicManager.getJMSTopicManager(factoryName, providerURL,
urlPkgPrefixes,
             securityPrincipalName, securityCredentials, factoryBindingName, topicBindingName,
userName, password);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/GZCompressAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/GZCompressAction.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/GZCompressAction.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/GZCompressAction.java
Wed Oct 10 17:09:07 2012
@@ -107,7 +107,7 @@ public final class GZCompressAction exte
             fis.close();
 
             if (deleteSource && !source.delete()) {
-                LOGGER.warn("Unable to delete " + source.toString() + ".");
+                LOGGER.warn("Unable to delete " + source.toString() + '.');
             }
 
             return true;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/ZipCompressAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/ZipCompressAction.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/ZipCompressAction.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/ZipCompressAction.java
Wed Oct 10 17:09:07 2012
@@ -111,7 +111,7 @@ public final class ZipCompressAction ext
             fis.close();
 
             if (deleteSource && !source.delete()) {
-                LOGGER.warn("Unable to delete " + source.toString() + ".");
+                LOGGER.warn("Unable to delete " + source.toString() + '.');
             }
 
             return true;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java
Wed Oct 10 17:09:07 2012
@@ -720,7 +720,7 @@ public class BaseConfiguration extends F
             LoggerConfig logger = entry.getValue();
             String name = entry.getKey();
             if (!name.equals("")) {
-                int i = name.lastIndexOf(".");
+                int i = name.lastIndexOf('.');
                 if (i > 0) {
                     name = name.substring(0, i);
                     LoggerConfig parent = getLoggerConfig(name);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
Wed Oct 10 17:09:07 2012
@@ -182,7 +182,7 @@ public class PluginManager {
         DecimalFormat numFormat = new DecimalFormat("#0");
         long seconds = elapsed / NANOS_PER_SECOND;
         elapsed %= NANOS_PER_SECOND;
-        sb.append(numFormat.format(seconds)).append(".");
+        sb.append(numFormat.format(seconds)).append('.');
         numFormat = new DecimalFormat("000000000");
         sb.append(numFormat.format(elapsed)).append(" seconds");
         LOGGER.debug(sb.toString());

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
Wed Oct 10 17:09:07 2012
@@ -73,7 +73,7 @@ public final class Loader {
             ClassLoader classLoader = getTCL();
             if (classLoader != null) {
                 LOGGER.trace("Trying to find [" + resource + "] using context classloader
"
-                        + classLoader + ".");
+                        + classLoader + '.');
                 URL url = classLoader.getResource(resource);
                 if (url != null) {
                     return url;
@@ -149,7 +149,7 @@ public final class Loader {
         try {
             classLoader = getTCL();
             if (classLoader != null) {
-                LOGGER.trace("Trying to find [" + resource + "] using context classloader
" + classLoader + ".");
+                LOGGER.trace("Trying to find [" + resource + "] using context classloader
" + classLoader + '.');
                 is = classLoader.getResourceAsStream(resource);
                 if (is != null) {
                     return is;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/NameUtil.java
Wed Oct 10 17:09:07 2012
@@ -28,7 +28,7 @@ public final class NameUtil {
         if (name.length() == 0) {
             return null;
         }
-        int i = name.lastIndexOf(".");
+        int i = name.lastIndexOf('.');
         return i > 0 ? name.substring(0, i) : "";
     }
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
Wed Oct 10 17:09:07 2012
@@ -290,7 +290,7 @@ public final class RFC5424Layout extends
 
         int millis = cal.get(Calendar.MILLISECOND);
         if (millis != 0) {
-            buf.append(".");
+            buf.append('.');
             pad(millis, THREE_DIGITS, buf);
         }
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSQueueManager.java
Wed Oct 10 17:09:07 2012
@@ -82,7 +82,7 @@ public class JMSQueueManager extends Abs
             return null;
         }
 
-        String name = "JMSQueue:" + factoryBindingName + "." + queueBindingName;
+        String name = "JMSQueue:" + factoryBindingName + '.' + queueBindingName;
         return (JMSQueueManager) getManager(name, factory, new FactoryData(factoryName, providerURL,
urlPkgPrefixes,
             securityPrincipalName, securityCredentials, factoryBindingName, queueBindingName,
userName, password));
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java
Wed Oct 10 17:09:07 2012
@@ -82,7 +82,7 @@ public class JMSTopicManager extends Abs
             return null;
         }
 
-        String name = "JMSTopic:" + factoryBindingName + "." + topicBindingName;
+        String name = "JMSTopic:" + factoryBindingName + '.' + topicBindingName;
         return (JMSTopicManager) getManager(name, factory, new FactoryData(factoryName, providerURL,
urlPkgPrefixes,
             securityPrincipalName, securityCredentials, factoryBindingName, topicBindingName,
userName, password));
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java
Wed Oct 10 17:09:07 2012
@@ -69,7 +69,7 @@ public class SocketServer extends Abstra
         if (logger == null) {
             logger = LogManager.getLogger(this);
             // TODO: Consider
-            // logger = LogManager.getLogger(getClass().getName() + "." + port);
+            // logger = LogManager.getLogger(getClass().getName() + '.' + port);
         }
     }
      /**

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java
Wed Oct 10 17:09:07 2012
@@ -95,7 +95,7 @@ public abstract class NameAbbreviator {
                 }
 
                 fragments.add(new PatternAbbreviatorFragment(charCount, ellipsis));
-                pos = trimmed.indexOf(".", pos);
+                pos = trimmed.indexOf('.', pos);
 
                 if (pos == -1) {
                     break;
@@ -182,7 +182,7 @@ public abstract class NameAbbreviator {
             int end = buf.length() - 1;
 
             for (int i = count; i > 0; i--) {
-                end = buf.lastIndexOf(".", end - 1);
+                end = buf.lastIndexOf('.', end - 1);
                 if (end == -1) {
                     return buf;
                 }
@@ -228,7 +228,7 @@ public abstract class NameAbbreviator {
          * @return starting index of next element.
          */
         public int abbreviate(final StringBuilder buf, final int startPos) {
-            int nextDot = buf.toString().indexOf(".", startPos);
+            int nextDot = buf.toString().indexOf('.', startPos);
 
             if (nextDot != -1) {
                 if ((nextDot - startPos) > charCount) {

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/DebugDisabledPerformanceComparison.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/DebugDisabledPerformanceComparison.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/DebugDisabledPerformanceComparison.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/DebugDisabledPerformanceComparison.java
Wed Oct 10 17:09:07 2012
@@ -182,7 +182,7 @@ public class DebugDisabledPerformanceCom
         Integer j = new Integer(2);
         long start = System.nanoTime();
         for (int i = 0; i < loop; i++) {
-            log4jlogger.debug("SEE IF THIS IS LOGGED " + j + ".");
+            log4jlogger.debug("SEE IF THIS IS LOGGED " + j + '.');
         }
         return (System.nanoTime() - start) / loop;
     }
@@ -191,7 +191,7 @@ public class DebugDisabledPerformanceCom
         Integer j = new Integer(2);
         long start = System.nanoTime();
         for (int i = 0; i < loop; i++) {
-            logbacklogger.debug("SEE IF THIS IS LOGGED " + j + ".");
+            logbacklogger.debug("SEE IF THIS IS LOGGED " + j + '.');
         }
         return (System.nanoTime() - start) / loop;
     }
@@ -210,7 +210,7 @@ public class DebugDisabledPerformanceCom
         Integer j = new Integer(2);
         long start = System.nanoTime();
         for (int i = 0; i < loop; i++) {
-            logger.debug("SEE IF THIS IS LOGGED " + j + ".");
+            logger.debug("SEE IF THIS IS LOGGED " + j + '.');
         }
         return (System.nanoTime() - start) / loop;
     }
@@ -229,7 +229,7 @@ public class DebugDisabledPerformanceCom
         Integer j = new Integer(2);
         long start = System.nanoTime();
         for (int i = 0; i < loop; i++) {
-            w.write("SEE IF THIS IS LOGGED " + j + ".");
+            w.write("SEE IF THIS IS LOGGED " + j + '.');
         }
         return (System.nanoTime() - start) / loop;
     }
@@ -238,7 +238,7 @@ public class DebugDisabledPerformanceCom
         Integer j = new Integer(2);
         long start = System.nanoTime();
         for (int i = 0; i < loop; i++) {
-            os.write(getBytes("SEE IF THIS IS LOGGED " + j + "."));
+            os.write(getBytes("SEE IF THIS IS LOGGED " + j + '.'));
         }
         return (System.nanoTime() - start) / loop;
     }
@@ -248,7 +248,7 @@ public class DebugDisabledPerformanceCom
         ByteBuffer buf = ByteBuffer.allocateDirect(8*1024);
         long start = System.nanoTime();
         for (int i = 0; i < loop; i++) {
-            channel.write(getByteBuffer(buf, "SEE IF THIS IS LOGGED " + j + "."));
+            channel.write(getByteBuffer(buf, "SEE IF THIS IS LOGGED " + j + '.'));
         }
         return (System.nanoTime() - start) / loop;
     }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/PerformanceComparison.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/PerformanceComparison.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/PerformanceComparison.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/PerformanceComparison.java
Wed Oct 10 17:09:07 2012
@@ -125,7 +125,7 @@ public class PerformanceComparison {
         Integer j = new Integer(2);
         long start = System.nanoTime();
         for (int i = 0; i < loop; i++) {
-            log4jlogger.debug("SEE IF THIS IS LOGGED " + j + ".");
+            log4jlogger.debug("SEE IF THIS IS LOGGED " + j + '.');
         }
         return (System.nanoTime() - start) / loop;
     }
@@ -134,7 +134,7 @@ public class PerformanceComparison {
         Integer j = new Integer(2);
         long start = System.nanoTime();
         for (int i = 0; i < loop; i++) {
-            logbacklogger.debug("SEE IF THIS IS LOGGED " + j + ".");
+            logbacklogger.debug("SEE IF THIS IS LOGGED " + j + '.');
         }
         return (System.nanoTime() - start) / loop;
     }
@@ -144,7 +144,7 @@ public class PerformanceComparison {
         Integer j = new Integer(2);
         long start = System.nanoTime();
         for (int i = 0; i < loop; i++) {
-            logger.debug("SEE IF THIS IS LOGGED " + j + ".");
+            logger.debug("SEE IF THIS IS LOGGED " + j + '.');
         }
         return (System.nanoTime() - start) / loop;
     }
@@ -154,7 +154,7 @@ public class PerformanceComparison {
         Integer j = new Integer(2);
         long start = System.nanoTime();
         for (int i = 0; i < loop; i++) {
-            w.write("SEE IF THIS IS LOGGED " + j + ".");
+            w.write("SEE IF THIS IS LOGGED " + j + '.');
         }
         return (System.nanoTime() - start) / loop;
     }
@@ -163,7 +163,7 @@ public class PerformanceComparison {
         Integer j = new Integer(2);
         long start = System.nanoTime();
         for (int i = 0; i < loop; i++) {
-            os.write(getBytes("SEE IF THIS IS LOGGED " + j + "."));
+            os.write(getBytes("SEE IF THIS IS LOGGED " + j + '.'));
         }
         return (System.nanoTime() - start) / loop;
     }
@@ -173,7 +173,7 @@ public class PerformanceComparison {
         ByteBuffer buf = ByteBuffer.allocateDirect(8*1024);
         long start = System.nanoTime();
         for (int i = 0; i < loop; i++) {
-            channel.write(getByteBuffer(buf, "SEE IF THIS IS LOGGED " + j + "."));
+            channel.write(getByteBuffer(buf, "SEE IF THIS IS LOGGED " + j + '.'));
         }
         return (System.nanoTime() - start) / loop;
     }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/Timer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/Timer.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/Timer.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/Timer.java
Wed Oct 10 17:09:07 2012
@@ -182,7 +182,7 @@ public class Timer implements Serializab
 
             DecimalFormat numFormat = null;
             numFormat = new DecimalFormat("#0");
-            elapsed += numFormat.format(seconds) + ".";
+            elapsed += numFormat.format(seconds) + '.';
             numFormat = new DecimalFormat("000000000");
             elapsed += numFormat.format(nanoseconds) + " seconds";
             result.append(" stopped. Elapsed time: ").append(elapsed);
@@ -214,7 +214,7 @@ public class Timer implements Serializab
                 }
 
                 numFormat = new DecimalFormat("#0");
-                elapsed += numFormat.format(seconds) + ".";
+                elapsed += numFormat.format(seconds) + '.';
                 numFormat = new DecimalFormat("000000000");
                 elapsed += numFormat.format(nanoseconds) + " seconds";
                 result.append(" Average per iteration: ").append(elapsed);

Modified: logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java?rev=1396696&r1=1396695&r2=1396696&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
(original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
Wed Oct 10 17:09:07 2012
@@ -288,7 +288,7 @@ public class FlumeEmbeddedManager extend
                         sinks = value.trim().split(" ");
                     }
 
-                    props.put(name + "." + key, value);
+                    props.put(name + '.' + key, value);
                 }
 
                 String sourceChannels = channels;



Mime
View raw message