commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject svn commit: r966606 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java
Date Thu, 22 Jul 2010 12:04:07 GMT
Author: jcarman
Date: Thu Jul 22 12:04:07 2010
New Revision: 966606

URL: http://svn.apache.org/viewvc?rev=966606&view=rev
Log:
Changing the way we handle listener list.

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java?rev=966606&r1=966605&r2=966606&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java
Thu Jul 22 12:04:07 2010
@@ -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.CopyOnWriteA
  */
 public class EventListenerSupport<L>
 {
-    private final List<L> listeners;
+    private final List<L> listeners = new LinkedList<L>();
     private final L proxy;
 
     /**
@@ -77,7 +77,6 @@ public class EventListenerSupport<L>
      */
     public EventListenerSupport(Class<L> listenerInterface, ClassLoader classLoader)
     {
-        listeners = new CopyOnWriteArrayList<L>();
         proxy = listenerInterface.cast(Proxy.newProxyInstance(classLoader, new Class[]{listenerInterface},
                 new ProxyInvocationHandler()));
     }



Mime
View raw message