qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grk...@apache.org
Subject svn commit: r1071465 - in /qpid/trunk/qpid/java/broker/src: main/java/org/apache/qpid/server/logging/actors/CurrentActor.java test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java
Date Thu, 17 Feb 2011 00:57:59 GMT
Author: grkvlt
Date: Thu Feb 17 00:57:59 2011
New Revision: 1071465

URL: http://svn.apache.org/viewvc?rev=1071465&view=rev
Log:
QPID-3048: InternalBrokerBasecase not removing all log actors

Modified:
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/CurrentActor.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/CurrentActor.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/CurrentActor.java?rev=1071465&r1=1071464&r2=1071465&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/CurrentActor.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/CurrentActor.java
Thu Feb 17 00:57:59 2011
@@ -21,9 +21,6 @@
 package org.apache.qpid.server.logging.actors;
 
 import org.apache.qpid.server.logging.LogActor;
-import org.apache.qpid.server.logging.LogSubject;
-import org.apache.qpid.server.logging.LogMessage;
-import org.apache.qpid.server.logging.RootMessageLogger;
 
 import java.util.EmptyStackException;
 import java.util.Stack;
@@ -72,7 +69,7 @@ public class CurrentActor
     private static LogActor _defaultActor;
 
     /**
-     * Set a new LogActor to be the Current Actor
+     * Set a new {@link LogActor} to be the Current Actor
      * <p/>
      * This pushes the Actor in to the LIFO Queue
      *
@@ -85,7 +82,16 @@ public class CurrentActor
     }
 
     /**
-     * Remove the current LogActor.
+     * Remove all {@link LogActor}s
+     */
+    public static void removeAll()
+    {
+        Stack<LogActor> stack = _currentActor.get();
+        stack.clear();
+    }
+
+    /**
+     * Remove the current {@link LogActor}.
      * <p/>
      * Calling remove without calling set will result in an EmptyStackException.
      */
@@ -96,9 +102,7 @@ public class CurrentActor
     }
 
     /**
-     * Return the current head of the list of LogActors.
-     * <p/>
-     * If there has been no set call then this will return Null.
+     * Return the current head of the list of {@link LogActor}s.
      *
      * @return Current LogActor
      */

Modified: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java?rev=1071465&r1=1071464&r2=1071465&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java
(original)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java
Thu Feb 17 00:57:59 2011
@@ -149,10 +149,7 @@ public class InternalBrokerBaseCase exte
         {
             super.tearDown();
             // Purge Any erroneously added actors
-            while (CurrentActor.get() != null)
-            {
-                CurrentActor.remove();
-            }
+            CurrentActor.removeAll();
         }
     }
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message