Bugs item #3542190, was opened at 2012-07-10 14:21
Message generated for change (Comment added) made by milek_pl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=655717&aid=3542190&group_id=110216

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Problem with another language
Group: development version
>Status: Closed
>Resolution: Fixed
Priority: 7
Private: No
Submitted By: Dominique Pelle (dominikoeo)
Assigned to: Marcin Miłkowski (milek_pl)
Summary: [br] out of bound exception with word "C’hreizhig-don"

Initial Comment:
The following command gives an exception in LanguageTool (latest in SVN as of 
Tue Jul 10, 2012, svn r7690):

$ echo "C’hreizhig-don" | java -jar ~/sb/languagetool/dist/LanguageTool.jar -l 
br
Expected text language: Breton
Working on STDIN...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String 
index out of range: 21
        at java.lang.String.substring(String.java:1946)
        at 
org.languagetool.JLanguageTool.adjustRuleMatchPos(JLanguageTool.java:637)
        at 
org.languagetool.JLanguageTool.checkAnalyzedSentence(JLanguageTool.java:604)
        at org.languagetool.JLanguageTool.check(JLanguageTool.java:527)
        at org.languagetool.JLanguageTool.check(JLanguageTool.java:477)
        at org.languagetool.tools.Tools.checkText(Tools.java:121)
        at org.languagetool.Main.handleLine(Main.java:377)
        at org.languagetool.Main.runOnFileLineByLine(Main.java:286)
        at org.languagetool.Main.runOnFile(Main.java:170)
        at org.languagetool.Main.main(Main.java:490)

I notice that this bug is in the latest in SVN but it is not in the stable 
version (1.8).

So I suspect (without being sure) that it was introduced when switching to 
Morfologik speller for Breton (done after the 1.8 release).

----------------------------------------------------------------------

>Comment By: Marcin Miłkowski (milek_pl)
Date: 2012-07-11 01:33

Message:
Fixed in the SVN, I added your test case to the JUnit test.

----------------------------------------------------------------------

Comment By: Dominique Pelle (dominikoeo)
Date: 2012-07-10 20:24

Message:
I did a bisection to find when regression was introduced:

r7659 -> works OK
r7660 -> crash (out of bound exception)

So bug was introduced in this revision:

------------------------------------------------------------------------
r7660 | milek_pl | 2012-07-07 11:48:09 +0200 (Sat, 07 Jul 2012) | 1 line

remove hack and make class safer for different tokenizers that result with
variable-length separators
------------------------------------------------------------------------

So I'm assigning it to Marcin.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=655717&aid=3542190&group_id=110216

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Languagetool-cvs mailing list
Languagetool-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs

Reply via email to