When reading from non-KJV Bible modules sometimes the text is not returned but instead an exception results. This is seen in Bible Desktop when trying to read IBT's UZV (Uzbek) module Ps 117:1-29.
A patch for JSword is attached. The Verse class was not maintaining
its own versification value and so it was impossible for Verse to
operate properly in some circumstances.
The crux of the problem is seen in:
where Passage maintains its own versification value, but (Verse) Key
did not. So it was impossible to insure correct construction of a
Passage from an arbitrary Verse Key (all Passages returned were being
KJV versified even if the Verse was not KJV). This led to incorrect
Passage assignments and unhandled exceptions (such as when viewing
IBT's UZV module Ps 117:1-29).
The patch requires a Versification when instantiating any Verse class, and then that value is retained within the Verse key along with book, chapter and verse. A method was added called Verse.getVersification(). Also, to fix the above mentioned bug, Passage.getPassage(Key) now casts the Key as Verse, and if successful, it reads the Verse's Versification to pass it along to PassageKeyFactory.getKey(), thus enabling the resulting Passage to have the correct Versification and value.
This fix is also logically necessary since Verse points to an actual
Bible verse, and the versification is a necessary part of any actual
Bible address location.
I tested this patch with common-junit-alltests and everything passed
expect 4 failures related to Lucene stemming and stop-words. These
seem to be related to the Lucene version and appear totally unrelated
related to Verse Key. I also tested a bit with Bible-Desktop.