mirror of
https://github.com/apache/lucene.git
synced 2025-02-06 10:08:58 +00:00
SOLR-1660 -- CapitalizationFilter crashes if you use the maxWordCountOption
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@891596 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8b450730d3
commit
3d3d390db9
@ -142,6 +142,9 @@ Bug Fixes
|
||||
* SOLR-1651: Fixed Incorrect dataimport handler package name in SolrResourceLoader
|
||||
(Akshay Ukey via shalin)
|
||||
|
||||
* SOLR-1660: CapitalizationFilter crashes if you use the maxWordCountOption
|
||||
(Robert Muir via shalin)
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
||||
|
@ -206,6 +206,7 @@ class CapitalizationFilter extends TokenFilter {
|
||||
char[] backup = null;
|
||||
if (factory.maxWordCount < CapitalizationFilterFactory.DEFAULT_MAX_WORD_COUNT) {
|
||||
//make a backup in case we exceed the word count
|
||||
backup = new char[termBufferLength];
|
||||
System.arraycopy(termBuffer, 0, backup, 0, termBufferLength);
|
||||
}
|
||||
if (termBufferLength < factory.maxTokenLength) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user