[JIRA] (GLAZEDLISTS-419) removeListEventListener throws IAE for nonexistent listener

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[JIRA] (GLAZEDLISTS-419) removeListEventListener throws IAE for nonexistent listener

JIRA jira-no-reply@java.net

    [ https://java.net/jira/browse/GLAZEDLISTS-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=381841#comment-381841 ]

reden commented on GLAZEDLISTS-419:

Note that the system property is checked at class load time (it's a static final), so the system property must be set early and cannot be changed throughout the life of the program.

> removeListEventListener throws IAE for nonexistent listener
> -----------------------------------------------------------
>                 Key: GLAZEDLISTS-419
>                 URL: https://java.net/jira/browse/GLAZEDLISTS-419
>             Project: glazedlists
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.7.0
>         Environment: Operating System: All
> Platform: All
>            Reporter: heuermh
>            Assignee: reden
>            Priority: Minor
>             Fix For: 1.10.0
> EventList.removeListEventListener throws an IllegalArgumentException when passed
> an nonexistent listener.  Fine, but this behavior is not the same as
> javax.swing.event.EventListenerList, which fails silently.  Compounding the
> issue is that there is not a ListEventListener[] getListenerList() or similar
> method for clients to check against before calling remove.
> Possible remedies:
>  - implement removeListEventListener to fail silently
>  - add a new method removeListEventListenerIfPresent(ListEventListener) that
> fails silently
>  - add a new method ListEventListener[]/Collection<ListEventListener[]>
> getListenerList() or similar

This message was sent by Atlassian JIRA