<div dir="ltr">It also behaves differently depending on the default passage type, which could mean there is a secondary error in one of the passage implementations.<div><br></div><div>Here is a unit test:</div><div><div> @Test</div>
<div> public void testVerse0Resolves() throws NoSuchKeyException {</div><div> PassageKeyFactory.setDefaultType(PassageType.MIX);</div><div> final VersificationsMapper mapper = VersificationsMapper.instance();</div>
<div> Key k = mapper.mapVerse(VerseFactory.fromString(KJV, "Exod.28.0"), GERMAN);</div><div><br></div><div> assertEquals("Exod.28.0", k.getOsisRef());</div><div> assertVersification(GERMAN, k);</div>
<div> }</div></div><div>If, as in the above, the default passage type is set to MIX you get an ArrayIndexOutOfBoundsException:</div><div><div>java.lang.ArrayIndexOutOfBoundsException: Index out of range (Given 0, Max 0).</div>
<div>at org.crosswire.jsword.passage.AbstractPassage.getVerseAt(AbstractPassage.java:368)</div><div>at org.crosswire.jsword.passage.RocketPassage.getVerseAt(RocketPassage.java:220)</div><div>at org.crosswire.jsword.passage.AbstractPassage.addAll(AbstractPassage.java:515)</div>
<div>at org.crosswire.jsword.versification.VersificationsMapper.mapVerse(VersificationsMapper.java:126)</div><div>at net.bible.android.control.versification.VersificationConverter.convert(VersificationConverter.java:28)</div>
</div><div><br></div><div>But if the default passage type is left as SPEED then there is no immediate exception but an empty passage is returned.</div><div><br></div><div>I am a bit lost!</div><div><br></div><div>Martin<br>
</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 24 January 2014 12:56, Chris Burrell <span dir="ltr"><<a href="mailto:chris@burrell.me.uk" target="_blank">chris@burrell.me.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Zero verses indicate pre verse content. So in particular for psalms it is required.</p>
<p dir="ltr">In terms of the flag I'll have to look. I think it's to do with wanting to leave proper verse 0 unmapped. Will have to look at code to remember exactly why. It was done ages ago. <br>
Chris</p>
<div class="gmail_quote"><div><div class="h5">On 24 Jan 2014 13:00, "Martin Denham" <<a href="mailto:mjdenham@gmail.com" target="_blank">mjdenham@gmail.com</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<div dir="ltr"><div>What is the thinking behind the "zerosUnmapped" flag in all the mapping files? <br></div><div><br></div><div>I would expect </div><div> [KJV:Gen 2:0] -> [German:Gen 2:0]</div><div>but with zerosUnmapped being set in all v11n mapping files what I get is</div>
<div><div> [KJV:Gen 2:0] -> [German:]</div></div><div>which later causes an IndexOutOfBoundsException in KeyUtil when I pass in the empty Passage.</div><div><br></div><div>If I delete zerosUnmapped then what I get is:</div>
<div><div> [KJV:Gen 2:0] -> [German:Gen 2:0]</div></div><div>which is what I initially expected.</div><div><br></div><div>Martin<br></div></div>
<br></div></div>_______________________________________________<br>
jsword-devel mailing list<br>
<a href="mailto:jsword-devel@crosswire.org" target="_blank">jsword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a><br>
<br></blockquote></div>
<br>_______________________________________________<br>
jsword-devel mailing list<br>
<a href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a><br>
<br></blockquote></div><br></div>