mirror of https://github.com/apache/lucene.git
Add some extra check for validity of c'tor parameters in TrieRangeFilter
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@739439 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4d7f92be9b
commit
cb55b1671b
|
@ -60,6 +60,11 @@ public final class TrieRangeFilter extends Filter {
|
|||
this.max=(max==null) ? trieVariant.TRIE_CODED_NUMERIC_MAX : (
|
||||
maxInclusive ? max : variant.decrementTrieCoded(max)
|
||||
);
|
||||
// check encoded values
|
||||
if (
|
||||
this.min.length() != trieVariant.TRIE_CODED_LENGTH ||
|
||||
this.max.length() != trieVariant.TRIE_CODED_LENGTH
|
||||
) throw new NumberFormatException("Invalid trie encoded numerical value representation (incompatible length).");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue