lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1349992 - in /lucene/dev/trunk: ./ dev-tools/ lucene/ lucene/analysis/ lucene/analysis/common/ lucene/backwards/ lucene/core/ lucene/facet/ lucene/highlighter/ lucene/memory/ lucene/misc/ lucene/queryparser/src/test/org/apache/lucene/query...
Date Wed, 13 Jun 2012 18:59:24 GMT
Author: rmuir
Date: Wed Jun 13 18:59:22 2012
New Revision: 1349992

URL: http://svn.apache.org/viewvc?rev=1349992&view=rev
Log:
LUCENE-4135: checkDateFormatSanity needs to handle ParseException

Modified:
    lucene/dev/trunk/   (props changed)
    lucene/dev/trunk/dev-tools/   (props changed)
    lucene/dev/trunk/lucene/   (props changed)
    lucene/dev/trunk/lucene/CHANGES.txt   (props changed)
    lucene/dev/trunk/lucene/LICENSE.txt   (props changed)
    lucene/dev/trunk/lucene/NOTICE.txt   (props changed)
    lucene/dev/trunk/lucene/analysis/   (props changed)
    lucene/dev/trunk/lucene/analysis/common/   (props changed)
    lucene/dev/trunk/lucene/backwards/   (props changed)
    lucene/dev/trunk/lucene/build.xml   (props changed)
    lucene/dev/trunk/lucene/common-build.xml   (props changed)
    lucene/dev/trunk/lucene/core/   (props changed)
    lucene/dev/trunk/lucene/facet/   (props changed)
    lucene/dev/trunk/lucene/highlighter/   (props changed)
    lucene/dev/trunk/lucene/memory/   (props changed)
    lucene/dev/trunk/lucene/misc/   (props changed)
    lucene/dev/trunk/lucene/queryparser/src/test/org/apache/lucene/queryparser/flexible/standard/TestNumericQueryParser.java
    lucene/dev/trunk/lucene/site/   (props changed)
    lucene/dev/trunk/lucene/test-framework/   (props changed)
    lucene/dev/trunk/lucene/tools/   (props changed)
    lucene/dev/trunk/solr/   (props changed)
    lucene/dev/trunk/solr/CHANGES.txt   (props changed)
    lucene/dev/trunk/solr/NOTICE.txt   (props changed)
    lucene/dev/trunk/solr/common-build.xml   (props changed)
    lucene/dev/trunk/solr/contrib/   (props changed)
    lucene/dev/trunk/solr/core/   (props changed)
    lucene/dev/trunk/solr/example/   (props changed)
    lucene/dev/trunk/solr/lib/   (props changed)
    lucene/dev/trunk/solr/lib/httpclient-LICENSE-ASL.txt   (props changed)
    lucene/dev/trunk/solr/lib/httpclient-NOTICE.txt   (props changed)
    lucene/dev/trunk/solr/lib/httpcore-LICENSE-ASL.txt   (props changed)
    lucene/dev/trunk/solr/lib/httpcore-NOTICE.txt   (props changed)
    lucene/dev/trunk/solr/lib/httpmime-LICENSE-ASL.txt   (props changed)
    lucene/dev/trunk/solr/lib/httpmime-NOTICE.txt   (props changed)
    lucene/dev/trunk/solr/solrj/   (props changed)
    lucene/dev/trunk/solr/test-framework/   (props changed)
    lucene/dev/trunk/solr/testlogging.properties   (props changed)

Modified: lucene/dev/trunk/lucene/queryparser/src/test/org/apache/lucene/queryparser/flexible/standard/TestNumericQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/queryparser/src/test/org/apache/lucene/queryparser/flexible/standard/TestNumericQueryParser.java?rev=1349992&r1=1349991&r2=1349992&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/queryparser/src/test/org/apache/lucene/queryparser/flexible/standard/TestNumericQueryParser.java
(original)
+++ lucene/dev/trunk/lucene/queryparser/src/test/org/apache/lucene/queryparser/flexible/standard/TestNumericQueryParser.java
Wed Jun 13 18:59:22 2012
@@ -88,10 +88,13 @@ public class TestNumericQueryParser exte
   private static IndexReader reader = null;
   private static IndexSearcher searcher = null;
   
-  private static boolean checkDateFormatSanity(DateFormat dateFormat, long date)
-      throws ParseException {
-    return date == dateFormat.parse(dateFormat.format(new Date(date)))
+  private static boolean checkDateFormatSanity(DateFormat dateFormat, long date) {
+    try {
+      return date == dateFormat.parse(dateFormat.format(new Date(date)))
         .getTime();
+    } catch (ParseException e) {
+      return false;
+    }
   }
   
   @BeforeClass



Mime
View raw message