<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’ve not had a chance yet. And here again it is Friday.<div class=""><br class=""></div><div class="">— DM</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 13, 2015, at 11:41 AM, Martin Denham <<a href="mailto:mjdenham@gmail.com" class="">mjdenham@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi DM,<div class=""><br class=""></div><div class="">I was thinking about having a look at this again, but did you find time to investigate yet?</div><div class=""><br class=""></div><div class="">Martin</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On 7 November 2015 at 00:43, DM Smith <span dir="ltr" class=""><<a href="mailto:dmsmith@crosswire.org" target="_blank" class="">dmsmith@crosswire.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto" class=""><div class="">I'll have to check this weekend.<br class=""><br class="">Cent from my fone so theer mite be tipos. ;)</div><div class=""><div class="h5"><div class=""><br class="">On Nov 6, 2015, at 5:57 PM, Martin Denham <<a href="mailto:mjdenham@gmail.com" target="_blank" class="">mjdenham@gmail.com</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class="">Do the JSword junits currently run?<div class=""><br class=""></div><div class="">I was trying to do a simple fix by adding another putProperty method to swordBookMetaData and also adding a new SwordMetaDataLocator.TRANSIENT :<div class=""><div class=""> public void putProperty(String key, String value, SwordMetaDataLocator metaDataLocator) </div></div><div class="">which would allow me to set a property without persisting it.</div><div class=""><br class=""></div><div class="">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 class="">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 class=""><div class=""> table.add(SwordBookMetaData.KEY_DATA_PATH, "./modules/texts/ztext/kjv/");</div></div><div class=""><br class=""></div><div class="">Then I got</div><div class=""><div class="">java.lang.StringIndexOutOfBoundsException: String index out of range: -1</div><div class=""><span style="white-space:pre-wrap" class="">        </span>at org.crosswire.common.util.NetUtil.lengthenURI(NetUtil.java:391)<br class=""></div><div class=""><span style="white-space:pre-wrap" class="">        </span>at org.crosswire.jsword.book.sword.SwordBookMetaData.setLibrary(SwordBookMetaData.java:366)</div><div class="">because the test URI is an empty string and 0-1 is out of bounds in NetUtil:<br class=""></div></div><div class=""><div class="">char lastChar = path.charAt(path.length() - 1);<br class=""></div></div><div class=""><br class=""></div><div class="">So is the SwordBookMetaDataTest broken or am I doing something silly?</div><div class=""><br class=""></div><div class="">Thanks</div><div class="">Martin</div><div class=""><br class=""></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On 2 November 2015 at 21:44, Martin Denham <span dir="ltr" class=""><<a href="mailto:mjdenham@gmail.com" target="_blank" class="">mjdenham@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">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 class=""><br class=""></div><div class="">Currently BookMetadata.putproperty takes a boolean property which determines where the property is persisted.</div><div class="">void putProperty(String key, String value, boolean forFrontend);<br class=""></div><div class=""><div class="">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 class=""><font color="#888888" class=""><br class=""></font></span></div><span class=""><font color="#888888" class=""><div class=""><br class=""></div><div class="">Martin</div><div class=""><br class=""></div><div class=""><br class=""></div></font></span></div></div>
</blockquote></div><br class=""></div>
</div></blockquote></div></div><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">jsword-devel mailing list</span><br class=""><span class=""><a href="mailto:jsword-devel@crosswire.org" target="_blank" class="">jsword-devel@crosswire.org</a></span><br class=""><span class=""><a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank" class="">http://www.crosswire.org/mailman/listinfo/jsword-devel</a></span><br class=""></div></blockquote></div><br class="">_______________________________________________<br class="">
jsword-devel mailing list<br class="">
<a href="mailto:jsword-devel@crosswire.org" class="">jsword-devel@crosswire.org</a><br class="">
<a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" rel="noreferrer" target="_blank" class="">http://www.crosswire.org/mailman/listinfo/jsword-devel</a><br class="">
<br class=""></blockquote></div><br class=""></div>
_______________________________________________<br class="">jsword-devel mailing list<br class=""><a href="mailto:jsword-devel@crosswire.org" class="">jsword-devel@crosswire.org</a><br class="">http://www.crosswire.org/mailman/listinfo/jsword-devel<br class=""></div></blockquote></div><br class=""></div></body></html>