[jsword-devel] [JIRA] Created: (JS-182) GenBookBackend problem in contains(Key)

DM Smith (JIRA) jira at crosswire.org
Wed Mar 16 19:35:24 MST 2011


GenBookBackend problem in contains(Key)
---------------------------------------

                 Key: JS-182
                 URL: http://www.crosswire.org/bugs/browse/JS-182
             Project: JSword
          Issue Type: Bug
          Components: o.c.jsword.book.sword
    Affects Versions: 1.6
            Reporter: DM Smith
            Assignee: DM Smith
             Fix For: 1.6.1


GenBookBackend's boolean contains(Key) does not return true for every key returned by Key readIndex().

The problem is that some keys (interior nodes) have no text associated with them. The method contains(Key) tests to see if there is data associated with the key. It should just test either
* that it is a valid node or
* that it is an interior node with children or a leaf node with content.
Either way a node that returns false should not be in the result of readIndex.

Given that getRawText(Key) will return "" for such keys, I think the first way is most reasonable.

Looking at the code, I can't see where the current behavior is relied upon.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jsword-devel mailing list