Add missing consistency check

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1215349 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2011-12-16 23:47:16 +00:00
parent a55f511a77
commit e9a2796c85
1 changed files with 2 additions and 0 deletions

View File

@ -234,6 +234,8 @@ public final class NumericField extends Field {
*/
public NumericField(String name, int precisionStep, FieldType type) {
super(name, type);
if (precisionStep < 1)
throw new IllegalArgumentException("precisionStep must be >=1");
this.precisionStep = precisionStep;
}