You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2015/08/05 20:34:38 UTC

svn commit: r1694278 - in /lucene/dev/branches/lucene_solr_5_3: ./ lucene/ lucene/benchmark/ lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ solr/ solr/solrj/ solr/solrj/src/java/org/apache/solr/common/util/

Author: uschindler
Date: Wed Aug  5 18:34:38 2015
New Revision: 1694278

URL: http://svn.apache.org/r1694278
Log:
Merged revision(s) 1694277 from lucene/dev/branches/branch_5x:
Merged revision(s) 1694276 from lucene/dev/trunk:
LUCENE-6723: Fix date parsing problems in Java 9 with date formats using English weekday/month names.

Modified:
    lucene/dev/branches/lucene_solr_5_3/   (props changed)
    lucene/dev/branches/lucene_solr_5_3/lucene/   (props changed)
    lucene/dev/branches/lucene_solr_5_3/lucene/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/   (props changed)
    lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirContentSource.java
    lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java
    lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersContentSource.java
    lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecContentSource.java
    lucene/dev/branches/lucene_solr_5_3/solr/   (props changed)
    lucene/dev/branches/lucene_solr_5_3/solr/solrj/   (props changed)
    lucene/dev/branches/lucene_solr_5_3/solr/solrj/src/java/org/apache/solr/common/util/DateUtil.java

Modified: lucene/dev/branches/lucene_solr_5_3/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_3/lucene/CHANGES.txt?rev=1694278&r1=1694277&r2=1694278&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_3/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/lucene_solr_5_3/lucene/CHANGES.txt Wed Aug  5 18:34:38 2015
@@ -290,6 +290,9 @@ Bug fixes
 * LUCENE-6713: TooComplexToDeterminizeException claims to be serializable
   but wasn't (Simon Willnauer, Mike McCandless)
 
+* LUCENE-6723: Fix date parsing problems in Java 9 with date formats using
+  English weekday/month names.  (Uwe Schindler)
+
 Changes in Runtime Behavior
 
 * LUCENE-6501: The subreader structure in ParallelCompositeReader

Modified: lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirContentSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirContentSource.java?rev=1694278&r1=1694277&r2=1694278&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirContentSource.java (original)
+++ lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirContentSource.java Wed Aug  5 18:34:38 2015
@@ -177,7 +177,7 @@ public class DirContentSource extends Co
       dfi = new DateFormatInfo();
       dfi.pos = new ParsePosition(0);
       // date format: 30-MAR-1987 14:22:36.87
-      dfi.df = new SimpleDateFormat("dd-MMM-yyyy kk:mm:ss.SSS", Locale.ROOT);
+      dfi.df = new SimpleDateFormat("dd-MMM-yyyy kk:mm:ss.SSS", Locale.ENGLISH);
       dfi.df.setLenient(true);
       dateFormat.set(dfi);
     }

Modified: lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java?rev=1694278&r1=1694277&r2=1694278&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java (original)
+++ lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java Wed Aug  5 18:34:38 2015
@@ -184,7 +184,7 @@ public class DocMaker implements Closeab
   private boolean storeBytes = false;
 
   private static class DateUtil {
-    public SimpleDateFormat parser = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss", Locale.ROOT);
+    public SimpleDateFormat parser = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss", Locale.ENGLISH);
     public Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.ROOT);
     public ParsePosition pos = new ParsePosition(0);
     public DateUtil() {

Modified: lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersContentSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersContentSource.java?rev=1694278&r1=1694277&r2=1694278&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersContentSource.java (original)
+++ lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersContentSource.java Wed Aug  5 18:34:38 2015
@@ -80,7 +80,7 @@ public class ReutersContentSource extend
     if (dfi == null) {
       dfi = new DateFormatInfo();
       // date format: 30-MAR-1987 14:22:36.87
-      dfi.df = new SimpleDateFormat("dd-MMM-yyyy kk:mm:ss.SSS",Locale.ROOT);
+      dfi.df = new SimpleDateFormat("dd-MMM-yyyy kk:mm:ss.SSS",Locale.ENGLISH);
       dfi.df.setLenient(true);
       dfi.pos = new ParsePosition(0);
       dateFormat.set(dfi);

Modified: lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecContentSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecContentSource.java?rev=1694278&r1=1694277&r2=1694278&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecContentSource.java (original)
+++ lucene/dev/branches/lucene_solr_5_3/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecContentSource.java Wed Aug  5 18:34:38 2015
@@ -105,7 +105,7 @@ public class TrecContentSource extends C
       dfi = new DateFormatInfo();
       dfi.dfs = new SimpleDateFormat[DATE_FORMATS.length];
       for (int i = 0; i < dfi.dfs.length; i++) {
-        dfi.dfs[i] = new SimpleDateFormat(DATE_FORMATS[i], Locale.ROOT);
+        dfi.dfs[i] = new SimpleDateFormat(DATE_FORMATS[i], Locale.ENGLISH);
         dfi.dfs[i].setLenient(true);
       }
       dfi.pos = new ParsePosition(0);

Modified: lucene/dev/branches/lucene_solr_5_3/solr/solrj/src/java/org/apache/solr/common/util/DateUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_3/solr/solrj/src/java/org/apache/solr/common/util/DateUtil.java?rev=1694278&r1=1694277&r2=1694278&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_3/solr/solrj/src/java/org/apache/solr/common/util/DateUtil.java (original)
+++ lucene/dev/branches/lucene_solr_5_3/solr/solrj/src/java/org/apache/solr/common/util/DateUtil.java Wed Aug  5 18:34:38 2015
@@ -147,7 +147,7 @@ public class DateUtil {
     while (formatIter.hasNext()) {
       String format = (String) formatIter.next();
       if (dateParser == null) {
-        dateParser = new SimpleDateFormat(format, Locale.ROOT);
+        dateParser = new SimpleDateFormat(format, Locale.ENGLISH);
         dateParser.setTimeZone(GMT);
         dateParser.set2DigitYearStart(startDate);
       } else {