cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1503414 - /cxf/branches/2.5.x-fixes/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java
Date Mon, 15 Jul 2013 18:50:17 GMT
Author: dkulp
Date: Mon Jul 15 18:50:16 2013
New Revision: 1503414

URL: http://svn.apache.org/r1503414
Log:
Merged revisions 1503373 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1503373 | dkulp | 2013-07-15 14:03:46 -0400 (Mon, 15 Jul 2013) | 18 lines

  Merged revisions 1502599 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

  ........
    r1502599 | dkulp | 2013-07-12 12:21:06 -0400 (Fri, 12 Jul 2013) | 10 lines

    Merged revisions 1501373 via  git cherry-pick from
    https://svn.apache.org/repos/asf/cxf/trunk

    ........
      r1501373 | dkulp | 2013-07-09 12:41:29 -0400 (Tue, 09 Jul 2013) | 2 lines

      Some optimizations which also remove a PMD 5.0 error

    ........

  ........

........

Modified:
    cxf/branches/2.5.x-fixes/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java

Modified: cxf/branches/2.5.x-fixes/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java?rev=1503414&r1=1503413&r2=1503414&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java
Mon Jul 15 18:50:16 2013
@@ -28,24 +28,24 @@ package org.apache.cxf.management.web.lo
  */
 final class LoggingThread {
 
-    private static ThreadLocal<LoggingThread> threadLocal = new ThreadLocal<LoggingThread>()
{
-        @Override
-        protected LoggingThread initialValue() {
-            return new LoggingThread();
-        }
-    };
-
-    private boolean isSilent;
+    private static ThreadLocal<Boolean> threadLocal = new ThreadLocal<Boolean>();
 
     private LoggingThread() {
     }
 
     public static void markSilent(boolean silent) {
-        LoggingThread lt = threadLocal.get();
-        lt.isSilent = silent;
+        if (silent) {
+            threadLocal.set(Boolean.TRUE);
+        } else {
+            threadLocal.remove();
+        }
     }
 
     public static boolean isSilent() {
-        return threadLocal.get().isSilent;
+        Boolean b = threadLocal.get();
+        if (b != null) {
+            return b;
+        }
+        return false;
     }
 }



Mime
View raw message