commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Carman <>
Subject Re: [lang] Check for Duplicate Event Listener
Date Mon, 11 May 2015 16:47:46 GMT
On Mon, May 11, 2015 at 12:43 PM James Carman <>

> Great ideas!  I would think the non-duplicate part would be a global thing
> for that particular EventListenerSupport object, so it should probably be
> part of the constructor.  That would change the serialization of the
> objects, which is somewhat problematic, but we do control that ourselves
> (without version numbers, unfortunately), so we could always default the
> flag to false if the data's not there.  I doubt folks are storing event
> listeners in long-term storage, though.

Actually, after having sent that, the "support" object probably doesn't
care about duplicates itself, really.  It's the particular listener that
cares whether or not its logic will be called multiple time.  So, maybe it
is better to put it on the "add" method.  This would avoid the issue with
serialization, also. :)  Go for it!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message