(no commit message)
[utils] / support / general / src / test / java / org / wamblee / test / EventTracker.java
index 682a6961b1c6261e6b49cb2234e4ee7b03057fe6..8cbd4ace333a0f403fdffbfbb74fa7f044247b67 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */ 
+ */
 package org.wamblee.test;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.Logger;
 
 /**
  * Tracks the occurence of certain events in a test environment. Threads in a
@@ -41,7 +39,8 @@ import java.util.Map;
  * @author Erik Brakkee
  */
 public class EventTracker<Event> {
-    private static final Log LOG = LogFactory.getLog(EventTracker.class);
+    private static final Logger LOG = Logger.getLogger(EventTracker.class
+        .getName());
 
     /**
      * Map of Thread object to a list of events.
@@ -56,7 +55,7 @@ public class EventTracker<Event> {
         clear();
     }
 
-    public void clear() {
+    public synchronized void clear() {
         events = new HashMap<Thread, List<Event>>();
     }