mirror of https://github.com/apache/lucene.git
LUCENE-3969: add missing IAE to WikipediaTokenizer ctor
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3969@1311294 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
102ece7710
commit
d76a03214c
|
@ -177,6 +177,12 @@ public final class WikipediaTokenizer extends Tokenizer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init(int tokenOutput, Set<String> untokenizedTypes) {
|
private void init(int tokenOutput, Set<String> untokenizedTypes) {
|
||||||
|
// TODO: cutover to enum
|
||||||
|
if (tokenOutput != TOKENS_ONLY &&
|
||||||
|
tokenOutput != UNTOKENIZED_ONLY &&
|
||||||
|
tokenOutput != BOTH) {
|
||||||
|
throw new IllegalArgumentException("tokenOutput must be TOKENS_ONLY, UNTOKENIZED_ONLY or BOTH");
|
||||||
|
}
|
||||||
this.tokenOutput = tokenOutput;
|
this.tokenOutput = tokenOutput;
|
||||||
this.untokenizedTypes = untokenizedTypes;
|
this.untokenizedTypes = untokenizedTypes;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue