diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell2/Stemmer.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell2/Stemmer.java index b2057c501b2..54dce381b1a 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell2/Stemmer.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell2/Stemmer.java @@ -120,7 +120,6 @@ final class Stemmer { private List stem(char word[], int length, char[] flags, int recursionDepth) { // TODO: allow this stuff to be reused by tokenfilter List stems = new ArrayList(); - BytesRef scratch = new BytesRef(); for (int i = 0; i < length; i++) { List suffixes = dictionary.lookupSuffix(word, i, length - i); @@ -194,7 +193,6 @@ final class Stemmer { } if (affix.isCrossProduct() && recursionDepth < recursionCap) { - BytesRef scratch = new BytesRef(); dictionary.flagLookup.get(affix.getAppendFlags(), scratch); char appendFlags[] = Dictionary.decodeFlags(scratch); stems.addAll(stem(strippedWord, length, appendFlags, ++recursionDepth));