You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Andy Grove <an...@gmail.com> on 2007/07/02 13:58:21 UTC

Behaviour of getList() with open content properties

I have a question about the correct behaviour of getList().

If I have an open DataObject and I call getList( "foo" ) where foo is
not a defined property or an instance property, I would expect
getList() to return NULL. This is currently the case in Tuscany.

If "foo" is set and later unset, I would still expect getList( "foo" )
to return NULL. However, in this case, Tuscany returns an empty list.

This appears to be a bug in Tuscany but before I raise a JIRA and
write a CTS test I wanted to ask if this is the intended behaviour and
if I am interpreting the specification correctly here.

Thanks,

Andy Grove
Product Architect, HydraSDO
Rogue Wave Software
http://www.roguewave.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Behaviour of getList() with open content properties

Posted by Andy Grove <an...@gmail.com>.
Thanks, Kelvin. I thought I was seeing different behaviour last week
when I was testing this but I must have had a bug in my test. I've
added a test to the CTS based on your code snippet.

Thanks,

Andy.

On 7/2/07, kelvin goodson <ke...@gmail.com> wrote:
> Andy,
>  for the following code snippet ....
>
> List pFoo = person1.getList("foo");
> List bar = *new* ArrayList();
> person1.set("foo", bar);
> pFoo = person1.getList("foo");
> person1.unset("foo");
> pFoo = person1.getList("foo");
>
>
>
> I see pFoo ending up as null
>
> Regards, Kelvin.
>
>
> On 02/07/07, Andy Grove <an...@gmail.com> wrote:
> >
> > I have a question about the correct behaviour of getList().
> >
> > If I have an open DataObject and I call getList( "foo" ) where foo is
> > not a defined property or an instance property, I would expect
> > getList() to return NULL. This is currently the case in Tuscany.
> >
> > If "foo" is set and later unset, I would still expect getList( "foo" )
> > to return NULL. However, in this case, Tuscany returns an empty list.
> >
> > This appears to be a bug in Tuscany but before I raise a JIRA and
> > write a CTS test I wanted to ask if this is the intended behaviour and
> > if I am interpreting the specification correctly here.
> >
> > Thanks,
> >
> > Andy Grove
> > Product Architect, HydraSDO
> > Rogue Wave Software
> > http://www.roguewave.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>


-- 
Thanks,

Andy.

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Behaviour of getList() with open content properties

Posted by kelvin goodson <ke...@gmail.com>.
Andy,
 for the following code snippet ....

List pFoo = person1.getList("foo");
List bar = *new* ArrayList();
person1.set("foo", bar);
pFoo = person1.getList("foo");
person1.unset("foo");
pFoo = person1.getList("foo");



I see pFoo ending up as null

Regards, Kelvin.


On 02/07/07, Andy Grove <an...@gmail.com> wrote:
>
> I have a question about the correct behaviour of getList().
>
> If I have an open DataObject and I call getList( "foo" ) where foo is
> not a defined property or an instance property, I would expect
> getList() to return NULL. This is currently the case in Tuscany.
>
> If "foo" is set and later unset, I would still expect getList( "foo" )
> to return NULL. However, in this case, Tuscany returns an empty list.
>
> This appears to be a bug in Tuscany but before I raise a JIRA and
> write a CTS test I wanted to ask if this is the intended behaviour and
> if I am interpreting the specification correctly here.
>
> Thanks,
>
> Andy Grove
> Product Architect, HydraSDO
> Rogue Wave Software
> http://www.roguewave.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>