MINA
  1. MINA
  2. DIRMINA-733

The profile method in the ProfilerTimerFilter can caused more methods to be profiled than intended.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M6
    • Fix Version/s: 2.0.0
    • Component/s: Filter
    • Labels:
      None
    • Environment:
      Mina M6 and verified in the trunk.

      Description

      Issue affects the ProfilerTimerFilter.

      Some of the case statements in the profile method are missing a return/break. This causes the possibility of profiling to be enabled for methods other than the one specified. See method below

      public void profile(IoEventType type) {
      switch (type) {
      case MESSAGE_RECEIVED :
      profileMessageReceived = true;

      if (messageReceivedTimerWorker == null)

      { messageReceivedTimerWorker = new TimerWorker(); }

      return;

      case MESSAGE_SENT :
      profileMessageSent = true;

      if (messageSentTimerWorker == null)

      { messageSentTimerWorker = new TimerWorker(); }

      return;

      case SESSION_CREATED :
      profileSessionCreated = true;

      if (sessionCreatedTimerWorker == null)

      { sessionCreatedTimerWorker = new TimerWorker(); }

      case SESSION_OPENED :
      profileSessionOpened = true;

      if (sessionOpenedTimerWorker == null)

      { sessionOpenedTimerWorker = new TimerWorker(); }

      case SESSION_IDLE :
      profileSessionIdle = true;

      if (sessionIdleTimerWorker == null)

      { sessionIdleTimerWorker = new TimerWorker(); }

      case SESSION_CLOSED :
      profileSessionClosed = true;

      if (sessionClosedTimerWorker == null)

      { sessionClosedTimerWorker = new TimerWorker(); }

      }
      }

        Activity

        Christopher Popp created issue -
        Emmanuel Lecharny made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Emmanuel Lecharny made changes -
        Fix Version/s 2.0.0-RC2 [ 12313767 ]
        Emmanuel Lecharny made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Emmanuel Lecharny made changes -
        Fix Version/s 2.0.0 [ 12313701 ]
        Fix Version/s 2.0.0-RC2 [ 12313767 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Christopher Popp
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development