[
http://jira.jboss.com/jira/browse/JBREM-952?page=all ]
Ron Sigal closed JBREM-952.
---------------------------
Resolution: Done
Made listeners a synchronized list and replaced the offending code, in both
connectionTerminated() and connectionLost(), with a variant of
synchronized (listeners)
{
Iterator it = listeners.iterator();
while (it.hasNext())
{
((ConnectionListener) it.next()).handleConnectionException(ex, client);
}
}
CLONE [JBREM-944] - Fix race in ConnectionNotifier
--------------------------------------------------
Key: JBREM-952
URL:
http://jira.jboss.com/jira/browse/JBREM-952
Project: JBoss Remoting
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 2.4.0.CR1 (Pinto), 2.2.2.SP4
Reporter: Ron Sigal
Assigned To: Ron Sigal
Priority: Minor
Fix For: 2.4.0.GA
org.jboss.remoting.ConnectionNotifier.connectionTerminated() throws NullPointerExceptions
from the following code:
ConnectionListener[] list = (ConnectionListener[])listeners.toArray(new
ConnectionListener[listeners.size()]);
for(int x = 0; x < list.length; x++)
{
list[x].handleConnectionException(ex, client); // <<== NPE's
thrown here
}
It seems that listeners got smaller between the call to listeners.size() and the call to
listeners.toArray(), which could result in list having one or more null elements.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira