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/10/10 10:43:37 UTC

svn commit: r1707845 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/core/ solr/core/src/java/org/apache/solr/core/ImplicitPlugins.java

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);
   }
 }