lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1726118 - /lucene/dev/trunk/solr/contrib/morphlines-cell/src/java/org/apache/solr/morphlines/cell/SolrCellBuilder.java
Date Thu, 21 Jan 2016 22:16:55 GMT
Author: uschindler
Date: Thu Jan 21 22:16:55 2016
New Revision: 1726118

URL: http://svn.apache.org/viewvc?rev=1726118&view=rev
Log:
LUCENE-6978: Fix Morphlines locale parsing with empty string / null: use ROOT

Modified:
    lucene/dev/trunk/solr/contrib/morphlines-cell/src/java/org/apache/solr/morphlines/cell/SolrCellBuilder.java

Modified: lucene/dev/trunk/solr/contrib/morphlines-cell/src/java/org/apache/solr/morphlines/cell/SolrCellBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/morphlines-cell/src/java/org/apache/solr/morphlines/cell/SolrCellBuilder.java?rev=1726118&r1=1726117&r2=1726118&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/morphlines-cell/src/java/org/apache/solr/morphlines/cell/SolrCellBuilder.java
(original)
+++ lucene/dev/trunk/solr/contrib/morphlines-cell/src/java/org/apache/solr/morphlines/cell/SolrCellBuilder.java
Thu Jan 21 22:16:55 2016
@@ -329,6 +329,9 @@ public final class SolrCellBuilder imple
     
     @SuppressForbidden(reason = "Usage of outdated locale parsing with Locale#toString()
because of backwards compatibility")
     private Locale getLocale(String name) {
+      if (name == null || name.isEmpty()) {
+        return Locale.ROOT;
+      }
       for (Locale locale : Locale.getAvailableLocales()) {
         if (locale.toString().equals(name)) {
           return locale;



Mime
View raw message