Here's a tasty concurrency bug.
I get an IndexOutOfBoundsException from ThreadProxyEventList when a filtered list is displayed in a
JList via EventListModel. When the filter criteria changes and there are fewer items in the list, the
previously selected index may be greater than the number of items now in the list. If you then call
getSelectedValue() on the JList, it asks the underlying list for an index that doesn't exist and you get the
exception. I'm not doing any locking myself under the assumption that EventListModel is supposed to
be doing that behind the scenes.
Possibly related to: <a href="https://glazedlists.dev.java.net/servlets/ReadMsg?
listName=dev&msgNo=1066">IndexOutOfBoundsException in ThreadProxyEventList</a>
Verified to happen on Mac OSX and WinXP.