[
https://issues.apache.org/jira/browse/IMAP-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12912623#action_12912623
]
François-Denis Gonthier commented on IMAP-216:
----------------------------------------------
Oops no sorry. What I posted is my fixed version. Here is the current version
of the code.
List<MailboxListener> mListeners =
listeners.get(event.getMailboxPath());
if (mListeners != null && mListeners.isEmpty() == false) {
for (int i = 0; i < mListeners.size(); i++) {
MailboxListener l = mListeners.get(i);
if (l.isClosed()) {
mListeners.remove(l);
} else {
l.event(event);
}
}
}
> DelegatingMailboxListener might skip some events
> ------------------------------------------------
>
> Key: IMAP-216
> URL: https://issues.apache.org/jira/browse/IMAP-216
> Project: JAMES Imap
> Issue Type: Bug
> Reporter: François-Denis Gonthier
>
> In the following code from DelegatingMailboxListener, events might be skipped
> if the a closed listener is found and removed in the listener list.
> public void event(Event event) {
> List<MailboxListener> mListeners =
> listeners.get(event.getMailboxPath());
> if (mListeners != null && mListeners.isEmpty() == false) {
> int sz = mListeners.size();
> for (int i = 0; i < sz; i++) {
> MailboxListener l = mListeners.get(i);
> if (l.isClosed()) {
> mListeners.remove(l);
> } else {
> l.event(event);
> }
> }
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]