[jsword-devel] Comparison of TreeKeys can lead to false positives

DM Smith dmsmith at crosswire.org
Mon Mar 21 13:10:17 MST 2011


Would you fill out an issue in Jira? I think I know where in the code 
the problem is, but if you'd include a JUnit test case I'll add that too.

In Him,
     DM Smith

On 03/21/2011 04:06 PM, Martin Denham wrote:
> Hi,
>
> Some Books like Pilgrim's Progress and Edersheim have keys with 
> identical names but different parents.
>
> Here is an example from Pilgrims Progress:
>    Part I/The First Stage
>    Part II/The First Stage
>
> So if I have a key1='The First Stage' (in Part II) and I go through a 
> list of keys looking for a key that equals key1 I will arrive at the 
> wrong key.
>
> I am currently changing my code so that if a TreeKey has a parent I 
> also compare parents but I was wondering if you think the KeyTree 
> equals method in JSword should be extended to check parents.
>
> If the above isn't clear I can create a simple junit so show the 
> problem because I may possibly be taking the wrong approach.
>
> Regards
> Martin
>
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20110321/4c6c32dd/attachment.html>


More information about the jsword-devel mailing list