mirror of https://github.com/apache/lucene.git
Added date value pruning to prevent insane dates being passed to calendars
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1145453 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e007c5ac88
commit
f5ea01a5f4
|
@ -127,7 +127,10 @@ public class TestNumericQueryParser extends LuceneTestCase {
|
||||||
while ((randomDate = normalizeNumber(Math.abs(random.nextLong()))
|
while ((randomDate = normalizeNumber(Math.abs(random.nextLong()))
|
||||||
.longValue()) < 1000)
|
.longValue()) < 1000)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
// prune date value so it doesn't pass in insane values to some calendars.
|
||||||
|
randomDate = randomDate % 3400000000000l;
|
||||||
|
|
||||||
// truncate to second
|
// truncate to second
|
||||||
randomDate = (randomDate / 1000) * 1000;
|
randomDate = (randomDate / 1000) * 1000;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue