mirror of
https://github.com/apache/lucene.git
synced 2025-03-03 06:49:38 +00:00
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()))
|
||||
.longValue()) < 1000)
|
||||
;
|
||||
|
||||
|
||||
// prune date value so it doesn't pass in insane values to some calendars.
|
||||
randomDate = randomDate % 3400000000000l;
|
||||
|
||||
// truncate to second
|
||||
randomDate = (randomDate / 1000) * 1000;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user