activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-4562) SimplePriorityMessageDispatchChannel.clear() needs to reset size attribute
Date Thu, 30 May 2013 10:33:20 GMT

    [ https://issues.apache.org/jira/browse/AMQ-4562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13670214#comment-13670214
] 

Timothy Bish commented on AMQ-4562:
-----------------------------------

Fix looks fine to me.
                
> SimplePriorityMessageDispatchChannel.clear() needs to reset size attribute
> --------------------------------------------------------------------------
>
>                 Key: AMQ-4562
>                 URL: https://issues.apache.org/jira/browse/AMQ-4562
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.8.0
>            Reporter: Torsten Mielke
>            Assignee: Torsten Mielke
>
> SimplePriorityMessageDispatchChannel.clear() deletes all prefetched messages but does
not reset the size counter. The other method removeAll() does it correctly.
> Propose to fix this as follows:
> {code:title=SimplePriorityMessageDispatchChannel.java}
>     public void clear() {
>         synchronized (mutex) {
>             for (int i = 0; i < MAX_PRIORITY; i++) {
>                 lists[i].clear();
>             }
> 	    size = 0;
>         }
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message