On 06/12/2010 21:01, Sylvain Laurent wrote:
> I fixed most of your points except one, see below.
>>> + protected void processContainerRemoveChild(Container parent, Container
>>> child) {
>>> +
>>> + if (log.isDebugEnabled())
>>> + log.debug("Process removeChild[parent=" + parent + ",child="
>>> + + child + "]");
>>> +
>>> + try {
>>> + if (child instanceof Context) {
>>> + Context context = (Context) child;
>>> + context.removeLifecycleListener(this);
>>> + } else if (child instanceof Host) {
>>> + Host host = (Host) child;
>>> + host.removeContainerListener(this);
>>> + } else if (child instanceof Engine) {
>>> + Engine engine = (Engine) child;
>>> + engine.removeContainerListener(this);
>>> + }
>> Why all this? Just use:
>> child.removeLifecycleListener(this);
>
> No, it's not the same. The listener is interested in both LifeCycle events
> for Context, and Container events for Host and Engine. These are not the same
> things.
You can still drop the casts though and just call
child.removeLifecycleListener() and child.removeContainerListener()
Some of the other fixes still look a little odd. I suspect the Eclipse
formatter. I'll highlight those in a separate e-mail.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]