[
https://issues.apache.org/jira/browse/SOLR-9740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15649125#comment-15649125
]
ASF subversion and git services commented on SOLR-9740:
-------------------------------------------------------
Commit 768b7ff8f582b14d787563703eb3bd65388d9fac in lucene-solr's branch
refs/heads/branch_6x from [[email protected]]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=768b7ff ]
SOLR-9740: fix macro expansion of multi-valued parameters
> Parameter substitution (MacroExpander) Map expand issue
> -------------------------------------------------------
>
> Key: SOLR-9740
> URL: https://issues.apache.org/jira/browse/SOLR-9740
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 6.0.1
> Reporter: Erik Hatcher
> Attachments: SOLR-9740.patch
>
>
> {code}
> @Test
> public void testMap() {
> final Map<String,String[]> request = new HashMap<String,String[]>();
> request.put("fq", new String[] {"${one_ref}","two"});
> request.put("one_ref",new String[] {"one"});
> Map expanded = MacroExpander.expand(request);
> assertEquals("one", ((String[])expanded.get("fq"))[0]);
> assertEquals("two", ((String[]) expanded.get("fq"))[1]);
> }
> {code}
> fails with `java.lang.ArrayIndexOutOfBoundsException` because the resultant
> `expanded` structure only has a single "fq" value of "one". "two" got eaten.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]