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

This commit is contained in:
Adam authored and GitHub committed 2020-10-04 15:24:52 -07:00
1 parent 1237276823
commit 6e42ed0da4
2 files changed
+5 -2

No files matched your search

@@ -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);
}