[jsword-devel] Compare method in JSword

Chris Burrell chris at burrell.me.uk
Wed Sep 5 08:07:28 MST 2012


Hi

While I'm trying to retrieve a passage it seems to want to compare some
keys. I'm looking at the DRC module, with Tob 1, but the problem occurs
elsewhere.

Here's the stack trace I get. I'm at a lost to why we need to compare verse
numbers here, but perhaps someone can enlighten me. Happy to fix it if I
can understand what it's trying to do and a way forward.

Also,  I've made a small fix to the Versification elsewhere in the code
(pull request in Git).

Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at
org.crosswire.jsword.versification.Versification.getOrdinal(Versification.java:503)
at org.crosswire.jsword.passage.Verse.getOrdinal(Verse.java:440)
at org.crosswire.jsword.passage.Verse.compareTo(Verse.java:261)
at org.crosswire.jsword.passage.VerseRange.<init>(VerseRange.java:136)
at
org.crosswire.jsword.passage.VerseRangeFactory.fromText(VerseRangeFactory.java:124)
at
org.crosswire.jsword.passage.VerseRangeFactory.fromString(VerseRangeFactory.java:96)
at
org.crosswire.jsword.passage.VerseRangeFactory.fromString(VerseRangeFactory.java:61)
at
org.crosswire.jsword.passage.AbstractPassage.addVerses(AbstractPassage.java:879)
at
org.crosswire.jsword.passage.BitwisePassage.<init>(BitwisePassage.java:88)
at org.crosswire.jsword.passage.RocketPassage.<init>(RocketPassage.java:70)
at
org.crosswire.jsword.passage.PassageType$1.createPassage(PassageType.java:44)
at
org.crosswire.jsword.passage.PassageKeyFactory.getKey(PassageKeyFactory.java:83)
at
org.crosswire.jsword.book.basic.AbstractPassageBook.getKey(AbstractPassageBook.java:217)
at
com.tyndalehouse.step.core.service.jsword.impl.JSwordPassageServiceImpl.getBookData(JSwordPassageServiceImpl.java:447)
at
com.tyndalehouse.step.core.service.jsword.impl.JSwordPassageServiceImpl.getOsisText(JSwordPassageServiceImpl.java:433)
at
com.tyndalehouse.step.core.service.impl.BibleInformationServiceImpl.getPassageText(BibleInformationServiceImpl.java:128)
at
com.tyndalehouse.step.rest.controllers.BibleController.getBibleText(BibleController.java:157)
at
com.tyndalehouse.step.rest.controllers.BibleController.getBibleText(BibleController.java:138)
... 30 more


Crhis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20120905/95427955/attachment.html>


More information about the jsword-devel mailing list