Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] Assert and ListenerList

On Tuesday November 22 2005 08:51 pm, Jeff McAffer wrote:
> For better or worse the Equinox ListenerList implementation maintains a
> list that exactly matches the number of listeners. As such, passing in an
> initial size is not really relevant.  The new factory methods you suggest
> could be added but if we leave the old constructor the ambiguity would
> still remain.  Do your coding patterns ever pass 0 or 1 to your
> ListenerList(int)?  Assuming you don't, you will get
> IllegalArgumentExcpetions for any uses that have not been updated
> appropriately.

In the old JFace ListenerList implementation, the ListenerList(1) constructor 
was fairly common use case.

A tip for people migrating: After migrating, Search for References in the 
Workspace (Ctrl+Shift+G) to ListenerList(int).  Make sure that none of your 
classes are calling this constructor in error.



cheers,
d.




Back to the top