Details
-
Type: Bug
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.6
-
Fix Version/s: 1.6.1
-
Component/s: o.c.jsword.book.sword
-
Labels:None
Description
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.