[infinispan-dev] infinispan-tree, NodeImpl.getParent() seems to be buggy

Adrian Nistor anistor at redhat.com
Wed May 23 11:31:39 EDT 2012


Hi Manik,

Ok, then the root of this seems to be in jboss cache ... The javadoc of 
org.jboss.cache.Node.getParent() says: "Returns the parent node. If this 
is the root node, this method returns null||". But the implementation 
actually returns 'this' if it is the root node :-)

We'll fix the javadoc in infinispan-tree so it will match the 
implementation as you suggested.

Thanks,
Adrian

On 05/23/2012 05:22 PM, Manik Surtani wrote:
> Hmm, I think the Javadocs may be incorrect.  The tree module was primarily written as a compatibility API with JBoss Cache and in JBoss Cache, rootNode.getParent() returns rootNode.
>
> So the correct thing would be to correct the Javadocs.
>
> On 23 May 2012, at 14:35, Adrian Nistor wrote:
>
>> Hi,
>>
>> I spotted a potential problem in infinispan-tree. Noticed that the
>> javadoc of org.infinispan.tree.Node.getParent() ("Returns the parent
>> node. If this is the root node, this method returns<code>null</code>")
>> does not actually match the implementation. It seems
>> rootNode.getParent() == rootNode instead of being null.
>>
>> Can't be sure what was the intention here, but I'm assuming the javadoc
>> is correct. Can somebody confirm so I can file a bug?
>>
>> Thanks,
>> Adrian
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> --
> Manik Surtani
> manik at jboss.org
> twitter.com/maniksurtani
>
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20120523/8606674a/attachment-0001.html 


More information about the infinispan-dev mailing list