Skip to content

Commit

Permalink
Fix NPE for TestRandomChains.testRandomChainsWithLargeStrings (#13104)
Browse files Browse the repository at this point in the history
  • Loading branch information
easyice authored and uschindler committed Feb 15, 2024
1 parent c700424 commit c7da1ab
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.io.IOException;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Objects;
import org.apache.lucene.analysis.TokenFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
Expand Down Expand Up @@ -175,7 +176,7 @@ public ShingleFilter(TokenStream input, String tokenType) {
* @param tokenType token tokenType
*/
public void setTokenType(String tokenType) {
this.tokenType = tokenType;
this.tokenType = Objects.requireNonNull(tokenType, "tokenType");
}

/**
Expand Down

0 comments on commit c7da1ab

Please sign in to comment.