Fix WordFinder matching anything with empty BannedWords.txt (#1045)

This commit is contained in:
Adam
2020-10-04 15:24:52 -07:00
committed by GitHub
parent 1237276823
commit 6e42ed0da4
2 changed files with 5 additions and 2 deletions
@@ -27,6 +27,8 @@ class WordFinder
//trim extraneous leading pipe (|)
patternString = patternString.substring(1);
}
// No words are defined, match nothing.
else return;
this.pattern = Pattern.compile(patternString, Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
}