reden created GLAZEDLISTS-574:
---------------------------------
Summary: Exception when removing non-existent listener
Key: GLAZEDLISTS-574
URL:
https://java.net/jira/browse/GLAZEDLISTS-574 Project: glazedlists
Issue Type: Bug
Reporter: reden
Assignee: jessewilson
Trying to remove a listener that doesn't exist throws an IllegalArgumentException throws an exception. This is rather intolerant and annoying. Generally it would seem better to just ignore the call. (The listener is removed, right?)
Aside from the obvious reproduction case of just calling {{removeListEventListener}} twice, this can be seen by calling {{dispose}} twice on a FilterList. Here's an example trace:
{noformat}
Caused by: java.lang.IllegalArgumentException: Cannot remove nonexistent listener [...toString of listener snipped...]
at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.updateListEventListeners(SequenceDependenciesEventPublisher.java:223) ~[glazedlists_java15-1.9.0.jar:1.9.0]
at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.removeListener(SequenceDependenciesEventPublisher.java:186) ~[glazedlists_java15-1.9.0.jar:1.9.0]
at ca.odell.glazedlists.event.ListEventAssembler.removeListEventListener(ListEventAssembler.java:389) ~[glazedlists_java15-1.9.0.jar:1.9.0]
at ca.odell.glazedlists.AbstractEventList.removeListEventListener(AbstractEventList.java:79) ~[glazedlists_java15-1.9.0.jar:1.9.0]
at ca.odell.glazedlists.TransformedList.dispose(TransformedList.java:170) ~[glazedlists_java15-1.9.0.jar:1.9.0]
at ca.odell.glazedlists.FilterList.dispose(FilterList.java:157) ~[glazedlists_java15-1.9.0.jar:1.9.0]
{noformat}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)