mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] Closed: (DIRMINA-733) The profile method in the ProfilerTimerFilter can caused more methods to be profiled than intended.
Date Fri, 22 Jan 2010 17:39:22 GMT

     [ https://issues.apache.org/jira/browse/DIRMINA-733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emmanuel Lecharny closed DIRMINA-733.
-------------------------------------


> The profile method in the ProfilerTimerFilter can caused more methods to be profiled
than intended.
> ---------------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-733
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-733
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>    Affects Versions: 2.0.0-M6
>         Environment: Mina M6 and verified in the trunk.
>            Reporter: Christopher Popp
>            Priority: Minor
>             Fix For: 2.0.0-RC2
>
>
> 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();
>                 }
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message