cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <>
Subject Re: DO NOT REPLY [Bug 17673] - sendPage function in Flow causes an NPE.
Date Mon, 10 Mar 2003 09:36:39 GMT wrote:
> ------- Additional Comments From  2003-03-10 09:30 -------
> I have a patch (attached) that hopefully fixes this bug. What it does is to wrap
> the call to this.rootNode.invoke in o.a.c.components.treeprocessor.TreeProcessor
> with a call to CocoonComponentManager.startProcessing (before) and to
> CocoonComponentManager.endProcessing (after), mimicking the behavior of
> o.a.c.Cocoon.

Looks like this morning I enjoy talking to myself ;-).

One brief note: in order to fix that bug, I had to make two more 
changes, adding defensive null checks in AbstractEnvironment.release:

         if ( null != source && null != sourceResolver)
             this.sourceResolver.release( source );

and CocoonComponentManager.leaveEnvironment:

         if (desc != null) {

Is this a case of not enough defensive programming or do the NPEs that 
occur when the checks are not in place a symptom of a problem somewhere 
else that the checks merely hide from view?


Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail:

View raw message