diff --git a/CHANGES.txt b/CHANGES.txt index 8e09f30cb39..3190879cc12 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 ---------------------- diff --git a/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java b/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java index 693ddec734b..1aa6b439398 100644 --- a/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java +++ b/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java @@ -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) {