Skip to content

Commit

Permalink
Null isn't supported
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmiley committed Jan 30, 2025
1 parent e428006 commit 010ae6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package org.apache.solr.handler;

import static java.util.Collections.singletonMap;
import static org.apache.solr.common.params.CommonParams.JSON;
import static org.apache.solr.schema.IndexSchema.SchemaProps.Handler.COPY_FIELDS;
import static org.apache.solr.schema.IndexSchema.SchemaProps.Handler.DYNAMIC_FIELDS;
Expand All @@ -36,6 +37,7 @@
import org.apache.solr.api.ApiBag;
import org.apache.solr.api.JerseyResource;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.params.MapSolrParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.StrUtils;
import org.apache.solr.core.SolrCore;
Expand Down Expand Up @@ -168,7 +170,7 @@ private void handleGET(SolrQueryRequest req, SolrQueryResponse rsp) {
if (parts.size() > 2) {
req.setParams(
SolrParams.wrapDefaults(
SolrParams.of(pathParam, parts.get(2)), req.getParams()));
new MapSolrParams(singletonMap(pathParam, parts.get(2))), req.getParams()));
}
switch (realName) {
case "fields":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ public static SolrParams of() {
return EmptySolrParams.INSTANCE;
}

/** An immutable SolrParams holding one pair. */
/** An immutable SolrParams holding one pair (not null). */
public static SolrParams of(String k, String v) {
return new MapSolrParams(Map.of(k, v));
}
Expand Down

0 comments on commit 010ae6f

Please sign in to comment.