[jsword-devel] AccuracyType problems, question

P. R. B. dysbiote at yahoo.com
Tue Oct 3 17:11:42 MST 2006


Thanks! 

I was unable to sign up on the bugs page (the signon form submitted, but didn't return or timeout), so I've attached the zipped patch and JUnit here. Also, after grabbing the versification changes, BibleInfo and BibleNames seem to have some problems that cause my tests to fail after patching. I'm new to SVN, so it's possible that I didn't pick up all the changes (Using an Eclipse SVN plug-in, I assume using the "update" function with a project selected means that it will update all the files in the project). 

Here's a repeat of what the patch fixes:

There's a for loop in AccuracyType.fromText(String, String[], AccuracyType, VerseRange) that doesn't use its index when building the NoSuchVerseException
(the array is always referenced at index 1). For parts.length == 1, this causes an ArrayIndexOutOfBoundsException, for parts.length >= 3, this produces an invalid message in the exception. 
This patch moves the exception-building process into its own static method. 

The solution is "correct," but it may not fit the JSword coding conventions. If it doesn't, please let me know so I can accommodate future changes.

Thanks,
-Phillip




DM Smith <dmsmith555 at yahoo.com> wrote: Phillip,
Thanks! And welcome to JSword!


Yes, zip it and post it here. Or join the bugs database at www.crosswire.org/bugs and post a bug against JSword and attach the patch and junit there. No need to zip attachments there, but it is OK to do so.


In His Service,
 DM Smith

On Oct 2, 2006, at 10:08 PM, P. R. B. wrote:

Hello, 

I noticed a for loop in AccuracyType.fromText(String, String[], AccuracyType, VerseRange) that doesn't use its index when building the NoSuchVerseException
(the array is always referenced at index 1). For parts.length == 1, this causes an ArrayIndexOutOfBoundsException, for parts.length >= 3, this produces an invalid message in the exception. 

I have a SVN patch for it with a corresponding JUnit class. Assuming this problem isn't a known issue, is this patch something worth contributing? If so, should these be zipped and posted here or elsewhere?

Thanks,
-Phillip

   


---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates._______________________________________________
jsword-devel mailing list
jsword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/jsword-devel
 



_______________________________________________
jsword-devel mailing list
jsword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/jsword-devel


 				
---------------------------------
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.crosswire.org/pipermail/jsword-devel/attachments/20061003/c2a2fbbd/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AccuracyType_Patch.zip
Type: application/zip
Size: 1455 bytes
Desc: 4061894704-AccuracyType_Patch.zip
Url : http://www.crosswire.org/pipermail/jsword-devel/attachments/20061003/c2a2fbbd/attachment.zip 


More information about the jsword-devel mailing list