From a7cb9414f7a9ebc1a575398ad0693f474c8455b7 Mon Sep 17 00:00:00 2001 From: "James W. Carman" Date: Thu, 22 Jul 2010 12:04:07 +0000 Subject: [PATCH] Changing the way we handle listener list. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@966606 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/lang3/event/EventListenerSupport.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java b/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java index 2be4be303..581ac0e55 100644 --- a/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java +++ b/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java @@ -20,8 +20,8 @@ package org.apache.commons.lang3.event; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; +import java.util.LinkedList; import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; /** * An EventListenerSupport object can be used to manage a list of event listeners of a particular type. @@ -44,7 +44,7 @@ import java.util.concurrent.CopyOnWriteArrayList; */ public class EventListenerSupport { - private final List listeners; + private final List listeners = new LinkedList(); private final L proxy; /** @@ -77,7 +77,6 @@ public class EventListenerSupport */ public EventListenerSupport(Class listenerInterface, ClassLoader classLoader) { - listeners = new CopyOnWriteArrayList(); proxy = listenerInterface.cast(Proxy.newProxyInstance(classLoader, new Class[]{listenerInterface}, new ProxyInvocationHandler())); }