mirror of https://github.com/apache/lucene.git
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:
parent
a55f511a77
commit
e9a2796c85
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue