james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From François-Denis Gonthier (JIRA) <server-...@james.apache.org>
Subject [jira] Reopened: (IMAP-216) DelegatingMailboxListener might skip some events
Date Mon, 20 Sep 2010 19:12:35 GMT

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

François-Denis Gonthier reopened IMAP-216:
------------------------------------------


I'm sorry! This was just an early fix attempt. With this "fix", the iteration will try to
go beyond the length of the list if any item was removed. I was still debugging around that
while you used that incorrect version. I will post the correct fix once I have it working.

> DelegatingMailboxListener might skip some events
> ------------------------------------------------
>
>                 Key: IMAP-216
>                 URL: https://issues.apache.org/jira/browse/IMAP-216
>             Project: JAMES Imap
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 0.1
>            Reporter: François-Denis Gonthier
>            Assignee: Norman Maurer
>             Fix For: 0.2
>
>
> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message