[ 
http://issues.ops4j.org/jira/browse/PAXLOGGING-27?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_11297
 ] 

Niclas Hedhman commented on PAXLOGGING-27:
------------------------------------------

Feel free to commit yourself...

> IndexOutOfBoundsException in EventAdminTracker
> ----------------------------------------------
>
>                 Key: PAXLOGGING-27
>                 URL: http://issues.ops4j.org/jira/browse/PAXLOGGING-27
>             Project: Pax Logging
>          Issue Type: Bug
>    Affects Versions: 1.0-RC2
>            Reporter: Peter Doornbosch
>            Assignee: Niclas Hedhman
>
> Occasionally, we get the following exception:
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>        at java.util.LinkedList.entry(LinkedList.java:365)
>        at java.util.LinkedList.remove(LinkedList.java:357)
>        at 
> org.ops4j.pax.logging.EventAdminTracker.deliver(EventAdminTracker.java:94)
>        at 
> org.ops4j.pax.logging.EventAdminTracker.postEvent(EventAdminTracker.java:56)
> The fix is trivial, i think: in the EventAdminTracker.deliver, a 
> (synchronized!) check on the queue size is missing:
> while( m_queue.size() > 0 )
> {
>     Event event;
>     synchronized( m_queue )
>     {
>         event = (Event) m_queue.remove( 0 );
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.ops4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to