Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9740

Parameter substitution (MacroExpander) Map expand issue

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.0.1
    • 6.4
    • None
    • None

    Description

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

      fails with `java.lang.ArrayIndexOutOfBoundsException` because the resultant `expanded` structure only has a single "fq" value of "one". "two" got eaten.

      Attachments

        1. SOLR-9740.patch
          2 kB
          Yonik Seeley

        Activity

          People

            yseeley@gmail.com Yonik Seeley
            ehatcher Erik Hatcher
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: