You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Oliver Zeigermann <oz...@c1-fse.de> on 2003/10/16 13:39:46 UTC
Additional ObjectNode bug
There seems to be another bug in ObjectNode:
In getChildren() there is a check for childrenCache being null. If it
is, the cache will be recomputed. The cache will be reset on every
addition or removal of a binding or a child which is correct.
Unfortunately when copyObject() is called like from
MacroImpl.copyObject(...) bindings are reset, but not the children
cache. This leads to inconsisten data. An obvious fix would be to add
childrenCache = null;
at line 416 after ObjectNode result = null;
The problem occasionally occured with the tx file store while moving
resources. As it turned out it was a combination of non-transactional
and arbitrarily resetting caching in StandardStore and this minor error.
I suppose nobody noticed before as it only occurs when binding is
disabled. Also, slidestore.file.XMLFileDescriptorsStore does some
additional unbounded internal caching and thus does not reveal this error.
Oliver
Nevermann, Dr., Peter wrote:
> Thanks again, Martin. Sorry, I was in a hurry when I did the 1st fix.
>
> Regards,
> Peter
>
>
>>-----Original Message-----
>>From: Martin Holz [mailto:holz@fiz-chemie.de]
>>Sent: Tuesday, September 16, 2003 13:14
>>To: slide-dev@jakarta.apache.org
>>Subject: Re: ObjectNode bug
>>
>>
>>"Nevermann, Dr., Peter" <Pe...@softwareag.com> writes:
>>
>>
>>>Fixed.
>>
>>Unfortunatly not. You have to check the return value of parent() now.
>>
>>For example
>> ObjectNode p = new SubjectNode( new
>>UriPath(uri).parent().toString() );
>>at line 544 of ObjectNode.java will cause a NPE, if uri is '/'.
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org