Uploaded image for project: 'JBoss Remoting'
  1. JBoss Remoting
  2. JBREM-952

CLONE [JBREM-944] - Fix race in ConnectionNotifier

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 2.2.2.SP4, 2.4.0.CR1 (Pinto)
    • Fix Version/s: 2.4.0.GA (Pinto)
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ron_sigal Ronald Sigal
                  Reporter:
                  ron_sigal Ronald Sigal
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: