Uploaded image for project: 'Apache Freemarker'
  1. Apache Freemarker
  2. FREEMARKER-33

<#list map as k,v> doesn't works as expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 2.3.25-incubating
    • 2.3.26-incubating
    • engine
    • None

    Description

      package test;
      
      import java.util.HashMap;
      import java.util.Map;
      
      public class MapFactory {
      
      	public static Map<String, String> create() {
      		Map<String, String> map = new HashMap<>();
      		map.put("mykey", "myvalue");
      		return map;
      	}
      
      }
      
      <#list statics['test.MapFactory'].create() as k,v>
      ${k}
      </#list>
      

      I am expecting "mykey" only, but it render others like "getClass values .." also.

      Attachments

        Activity

          People

            Unassigned Unassigned
            quaff Yanming Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: