lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1707845 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/core/ solr/core/src/java/org/apache/solr/core/ImplicitPlugins.java
Date Sat, 10 Oct 2015 08:43:37 GMT
Author: uschindler
Date: Sat Oct 10 08:43:37 2015
New Revision: 1707845

URL: http://svn.apache.org/viewvc?rev=1707845&view=rev
Log:
Merged revision(s) 1707843 from lucene/dev/trunk:
Fix Java 9 compile failure (type inference does not work for this example: Java 9 compiler
is right!)

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/core/ImplicitPlugins.java

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/core/ImplicitPlugins.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/core/ImplicitPlugins.java?rev=1707845&r1=1707844&r2=1707845&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/core/ImplicitPlugins.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/core/ImplicitPlugins.java
Sat Oct 10 08:43:37 2015
@@ -99,6 +99,7 @@ public class ImplicitPlugins {
   public static PluginInfo getReqHandlerInfo(String name, Class clz, Map defaults) {
     if (defaults == null) defaults = Collections.emptyMap();
     Map m = makeMap(NAME, name, "class", clz.getName());
-    return new PluginInfo(SolrRequestHandler.TYPE, m, new NamedList<>(singletonMap(DEFAULTS,
new NamedList(defaults))), null);
+    // be explicit with generics, because Java 9 fails to compile otherwise (type inference:
Map.Entry[] vs. singletonMap):
+    return new PluginInfo(SolrRequestHandler.TYPE, m, new NamedList<>(Collections.<String,Object>singletonMap(DEFAULTS,
new NamedList<>(defaults))), null);
   }
 }



Mime
View raw message