Apache Lucene open-source search software
Added date value pruning to prevent insane dates being passed to calendars
Christopher John Malef5ea01a5f403
diff --git a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestNumericQueryParser.java b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestNumericQueryParser.javaindex d7cdd066dc1..f2045c94eb2 100644--- a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestNumericQueryParser.java+++ b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestNumericQueryParser.java@@ -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 secondrandomDate = (randomDate / 1000) * 1000;