mirror of https://github.com/apache/lucene.git
Fix Java 9 compile failure (type inference does not work for this example: Java 9 compiler is right!)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1707843 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6085c0a4c2
commit
4edfc729df
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue