<div dir="ltr">Hi DM,<div><br></div><div>I was thinking about having a look at this again, but did you find time to investigate yet?</div><div><br></div><div>Martin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 November 2015 at 00:43, DM Smith <span dir="ltr"><<a href="mailto:dmsmith@crosswire.org" target="_blank">dmsmith@crosswire.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>I'll have to check this weekend.<br><br>Cent from my fone so theer mite be tipos. ;)</div><div><div class="h5"><div><br>On Nov 6, 2015, at 5:57 PM, Martin Denham <<a href="mailto:mjdenham@gmail.com" target="_blank">mjdenham@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Do the JSword junits currently run?<div><br></div><div>I was trying to do a simple fix by adding another putProperty method to swordBookMetaData and also adding a new SwordMetaDataLocator.TRANSIENT :<div><div> public void putProperty(String key, String value, SwordMetaDataLocator metaDataLocator) </div></div><div>which would allow me to set a property without persisting it.</div><div><br></div><div>But I don't think that SwordBookMetaDataTest is currently working - at least it is one of the few tests that fails on my pc.</div><div>The first problem I had was that SwordBookMetaData.KEY_DATA_PATH was not set causing an NPE in SwordBookMetaData.setLibrary, so I fixed that by adding this to the junit setUp()</div><div><div> table.add(SwordBookMetaData.KEY_DATA_PATH, "./modules/texts/ztext/kjv/");</div></div><div><br></div><div>Then I got</div><div><div>java.lang.StringIndexOutOfBoundsException: String index out of range: -1</div><div><span style="white-space:pre-wrap">        </span>at org.crosswire.common.util.NetUtil.lengthenURI(NetUtil.java:391)<br></div><div><span style="white-space:pre-wrap">        </span>at org.crosswire.jsword.book.sword.SwordBookMetaData.setLibrary(SwordBookMetaData.java:366)</div><div>because the test URI is an empty string and 0-1 is out of bounds in NetUtil:<br></div></div><div><div>char lastChar = path.charAt(path.length() - 1);<br></div></div><div><br></div><div>So is the SwordBookMetaDataTest broken or am I doing something silly?</div><div><br></div><div>Thanks</div><div>Martin</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 November 2015 at 21:44, Martin Denham <span dir="ltr"><<a href="mailto:mjdenham@gmail.com" target="_blank">mjdenham@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">And Bible adds a temporary property to SwordBookMetaData to identify which repository a downloadable book came from. This sort of property is transient and does not need to be stored. However, to prevent this throwing an exception after upgrade to the recent JSword I needed to specify this as a ui property which is persisted in the jsword-mods.d folder. <div><br></div><div>Currently BookMetadata.putproperty takes a boolean property which determines where the property is persisted.</div><div>void putProperty(String key, String value, boolean forFrontend);<br></div><div><div>Would it be a good idea to make it possible to add transient properties that are not persisted? This might be done by using an enum instead of a boolean for the third property.<span><font color="#888888"><br></font></span></div><span><font color="#888888"><div><br></div><div>Martin</div><div><br></div><div><br></div></font></span></div></div>
</blockquote></div><br></div>
</div></blockquote></div></div><blockquote type="cite"><div><span>_______________________________________________</span><br><span>jsword-devel mailing list</span><br><span><a href="mailto:jsword-devel@crosswire.org" target="_blank">jsword-devel@crosswire.org</a></span><br><span><a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a></span><br></div></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" rel="noreferrer" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a><br>
<br></blockquote></div><br></div>