logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1584467 - /logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ExtendedThreadInformation.java
Date Thu, 03 Apr 2014 23:27:28 GMT
Author: mattsicker
Date: Thu Apr  3 23:27:28 2014
New Revision: 1584467

URL: http://svn.apache.org/r1584467
Log:
Replace single char strings with chars.

Modified:
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ExtendedThreadInformation.java

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ExtendedThreadInformation.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ExtendedThreadInformation.java?rev=1584467&r1=1584466&r2=1584467&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ExtendedThreadInformation.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ExtendedThreadInformation.java
Thu Apr  3 23:27:28 2014
@@ -35,8 +35,8 @@ class ExtendedThreadInformation implemen
 
     @Override
     public void printThreadInfo(final StringBuilder sb) {
-        sb.append("\"").append(info.getThreadName()).append("\"");
-        sb.append(" Id=").append(info.getThreadId()).append(" ");
+        sb.append('"').append(info.getThreadName()).append('"');
+        sb.append(" Id=").append(info.getThreadId()).append(' ');
         formatState(sb, info);
         if (info.isSuspended()) {
             sb.append(" (suspended)");
@@ -97,8 +97,8 @@ class ExtendedThreadInformation implemen
     }
 
     private void formatLock(final StringBuilder sb, final LockInfo lock) {
-        sb.append("<").append(lock.getIdentityHashCode()).append("> (a ");
-        sb.append(lock.getClassName()).append(")");
+        sb.append('<').append(lock.getIdentityHashCode()).append("> (a ");
+        sb.append(lock.getClassName()).append(')');
     }
 
     private void formatState(final StringBuilder sb, final ThreadInfo info) {
@@ -107,7 +107,7 @@ class ExtendedThreadInformation implemen
         switch (state) {
             case BLOCKED: {
                 sb.append(" (on object monitor owned by \"");
-                sb.append(info.getLockOwnerName()).append("\" Id=").append(info.getLockOwnerId()).append(")");
+                sb.append(info.getLockOwnerName()).append("\" Id=").append(info.getLockOwnerId()).append(')');
                 break;
             }
             case WAITING: {
@@ -120,16 +120,16 @@ class ExtendedThreadInformation implemen
                         sb.append(" owned by \"");
                         sb.append(info.getLockOwnerName()).append("\" Id=").append(info.getLockOwnerId());
                     }
-                    sb.append(")");
+                    sb.append(')');
                 } else if (className.equals("java.lang.Thread") && method.equals("join"))
{
-                    sb.append(" (on completion of thread ").append(info.getLockOwnerId()).append(")");
+                    sb.append(" (on completion of thread ").append(info.getLockOwnerId()).append(')');
                 } else {
                     sb.append(" (parking for lock");
                     if (info.getLockOwnerName() != null) {
                         sb.append(" owned by \"");
                         sb.append(info.getLockOwnerName()).append("\" Id=").append(info.getLockOwnerId());
                     }
-                    sb.append(")");
+                    sb.append(')');
                 }
                 break;
             }
@@ -143,18 +143,18 @@ class ExtendedThreadInformation implemen
                         sb.append(" owned by \"");
                         sb.append(info.getLockOwnerName()).append("\" Id=").append(info.getLockOwnerId());
                     }
-                    sb.append(")");
+                    sb.append(')');
                 } else if (className.equals("java.lang.Thread") && method.equals("sleep"))
{
                     sb.append(" (sleeping)");
                 } else if (className.equals("java.lang.Thread") && method.equals("join"))
{
-                    sb.append(" (on completion of thread ").append(info.getLockOwnerId()).append(")");
+                    sb.append(" (on completion of thread ").append(info.getLockOwnerId()).append(')');
                 } else {
                     sb.append(" (parking for lock");
                     if (info.getLockOwnerName() != null) {
                         sb.append(" owned by \"");
                         sb.append(info.getLockOwnerName()).append("\" Id=").append(info.getLockOwnerId());
                     }
-                    sb.append(")");
+                    sb.append(')');
                 }
                 break;
             }



Mime
View raw message