You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steve Rowe (JIRA)" <ji...@apache.org> on 2013/03/17 07:02:13 UTC

[jira] [Commented] (LUCENE-4842) SynonymMap.Builder.join(String[], CharsRef) is untested and broken

    [ https://issues.apache.org/jira/browse/LUCENE-4842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13604515#comment-13604515 ] 

Steve Rowe commented on LUCENE-4842:
------------------------------------

Patch fixes the issues, and switches {{TestSynonymMapFilter.add()}} to use it.

Committing shortly.
                
> SynonymMap.Builder.join(String[], CharsRef) is untested and broken
> ------------------------------------------------------------------
>
>                 Key: LUCENE-4842
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4842
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: Steve Rowe
>            Assignee: Steve Rowe
>            Priority: Minor
>         Attachments: LUCENE-4842.patch
>
>
> {{SynonymMap.Builder.join()}} throws {{ArrayIndexOutOfBounds}} when you give it more than one {{String}}: the amount it grows to add the word separator is off by one; it fails to set the length of the {{CharsRef}} it populates; and it needlessly calls {{CharsRef.grow()}} twice per word, first for the word separator and again for the word to be appended.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org