Noel J. Bergman wrote:
- I see an inner class. these not considered evil anymore? Why not?
Why would anyone consider inner classes evil?  They are an absolutely
appropriate and useful language feature when used properly.
The support for them in older jdks is buggy (I believe the early IBM ones, especially), and they are not specified very clearly in the java language spec.

something like that. I forgot :D

- there can only be one listener instead of the multiple listeners
I haven't looked (at all) at the code, but if it allows only a single
listener, then it should throw an exception if a second add is attempted:

  public synchronized void add<T>Listener(<T>Listener listener)
    throws java.util.TooManyListenersException;

Sometimes you do want to allow only one listener.  Whether or not that is
the case here is another issue.
hmm. I think maybe the method instead should be set<T>Listener then so the contract is clear. The code simply replaces the old listener with the new one.

cheers,

- Leo



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to