You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2020/12/05 10:02:01 UTC

[lucene-solr] branch jira/solr-15016 updated: SOLR-15016: Use utility method here to allow for nulls.

This is an automated email from the ASF dual-hosted git repository.

ab pushed a commit to branch jira/solr-15016
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/jira/solr-15016 by this push:
     new b5e5dda  SOLR-15016: Use utility method here to allow for nulls.
b5e5dda is described below

commit b5e5dda8844c4ebb05b0738174aadca52da5dcdf
Author: Andrzej Bialecki <ab...@apache.org>
AuthorDate: Sat Dec 5 11:01:32 2020 +0100

    SOLR-15016: Use utility method here to allow for nulls.
---
 solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java b/solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
index b9cc6c7..9fa0261 100644
--- a/solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
+++ b/solr/core/src/java/org/apache/solr/api/ContainerPluginsRegistry.java
@@ -58,6 +58,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import static org.apache.lucene.util.IOUtils.closeWhileHandlingException;
+import static org.apache.solr.common.util.Utils.makeMap;
 
 /**
  * This class manages the container-level plugins and their Api-s. It is
@@ -235,8 +236,9 @@ public class ContainerPluginsRegistry implements ClusterPropertiesListener, MapW
     return path;
   }
 
+  @SuppressWarnings({"rawtypes", "unchecked"})
   private static  Map<String, String> getTemplateVars(PluginMeta pluginMeta) {
-    return Map.of("plugin-name", pluginMeta.name, "path-prefix", pluginMeta.pathPrefix);
+    return (Map) makeMap("plugin-name", pluginMeta.name, "path-prefix", pluginMeta.pathPrefix);
   }
 
   private static class ApiHolder extends Api {