MazWoz / jsmpp

Automatically exported from code.google.com/p/jsmpp
Apache License 2.0
0 stars 0 forks source link

ConcurrentModificationException on AbstractSessionContext #95

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I caught some ConcurrentModificationException on AbstractSessionContext. This 
patch has been helpful:

Index: src/java/main/org/jsmpp/session/AbstractSessionContext.java
===================================================================
--- src/java/main/org/jsmpp/session/AbstractSessionContext.java (revision 1087)
+++ src/java/main/org/jsmpp/session/AbstractSessionContext.java (revision 1088)
@@ -14,8 +14,8 @@
  */
 package org.jsmpp.session;

-import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;

 import org.jsmpp.bean.BindType;
 import org.jsmpp.extra.SessionState;
@@ -29,7 +29,7 @@
 public abstract class AbstractSessionContext implements SessionContext {
     private static final Logger logger = LoggerFactory.getLogger(AbstractSessionContext.class);
     private long lastActivityTimestamp;
-    private List<SessionStateListener> sessionStateListeners = new 
ArrayList<SessionStateListener>();
+    private List<SessionStateListener> sessionStateListeners = new 
CopyOnWriteArrayList<SessionStateListener>();

Original issue reported on code.google.com by giancar...@gmail.com on 29 Mar 2011 at 1:24

GoogleCodeExporter commented 8 years ago

Original comment by uuda...@gmail.com on 30 Mar 2011 at 10:25

GoogleCodeExporter commented 8 years ago
Done

Original comment by uuda...@gmail.com on 30 Mar 2011 at 10:25