You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Kazó Csaba <ka...@freemail.hu> on 2007/08/06 15:26:26 UTC

ObjectModel bug

Hi Grek,

I've spotted a small regression in the stuff you're working on (ObjectModel). It breaks functionality, so I thought I'd make sure you know about it.

It happens when using the PipelineUtil functions. These save the current context object, overwrite it with the one specified as an argument, do the pipeline stuff, and finally restore the saved object. Now, if either of the two context objects involved is null (and the original one is always null, as far as I've seen), the FlowHelper.setContextObject throws a NullPointerException that originates in ObjectModelImpl.fillContext, line 142 (contextObject.getClass() call on null instance).

Csaba

Re: ObjectModel bug

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Kazó Csaba pisze:
> The test should be the other way round. :)

Gosh, you are right, of course! Many thanks. :)
Fixed permanently, I hope.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Re: ObjectModel bug

Posted by Kazó Csaba <ka...@freemail.hu>.
The test should be the other way round. :)

> Log:
> If context object is null do nothing in fillContext method.
>
> +        if (contextObject != null)
> +            //nothing to do
> +            return;

Re: ObjectModel bug

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Kazó Csaba pisze:
> Hi Grek,

Hi,

> I've spotted a small regression in the stuff you're working on (ObjectModel). It breaks functionality, so I thought I'd make sure you
> know about it.
> 
> It happens when using the PipelineUtil functions. These save the current context object, overwrite it with the one specified as an
> argument, do the pipeline stuff, and finally restore the saved object. Now, if either of the two context objects involved is null (and
> the original one is always null, as far as I've seen), the FlowHelper.setContextObject throws a NullPointerException that originates in
> ObjectModelImpl.fillContext, line 142 (contextObject.getClass() call on null instance).

Fixed in r563437.

Thanks for report.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/