From notifications-return-4902-archive-asf-public=cust-asf.ponee.io@freemarker.incubator.apache.org Fri Jan 19 04:53:03 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id C92A2180654 for ; Fri, 19 Jan 2018 04:53:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B857D160C48; Fri, 19 Jan 2018 03:53:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0AC48160C26 for ; Fri, 19 Jan 2018 04:53:02 +0100 (CET) Received: (qmail 87923 invoked by uid 500); 19 Jan 2018 03:53:02 -0000 Mailing-List: contact notifications-help@freemarker.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@freemarker.incubator.apache.org Delivered-To: mailing list notifications@freemarker.incubator.apache.org Received: (qmail 87912 invoked by uid 99); 19 Jan 2018 03:53:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jan 2018 03:53:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C316E1A026F for ; Fri, 19 Jan 2018 03:53:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.911 X-Spam-Level: X-Spam-Status: No, score=-99.911 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id gJQwIip0L1MZ for ; Fri, 19 Jan 2018 03:53:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id DA49B5F1F0 for ; Fri, 19 Jan 2018 03:53:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 60C1FE00A3 for ; Fri, 19 Jan 2018 03:53:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 22E6E20EA9 for ; Fri, 19 Jan 2018 03:53:00 +0000 (UTC) Date: Fri, 19 Jan 2018 03:53:00 +0000 (UTC) From: "Yanming Zhou (JIRA)" To: notifications@freemarker.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FREEMARKER-87) <#list map as key,value> should always iterating on map entries MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FREEMARKER-87?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1= 6331706#comment-16331706 ]=20 Yanming Zhou commented on FREEMARKER-87: ---------------------------------------- There is another problem, I try to make workaround, {code:java} <#list map as key,value><#assign value=3Dmap.get(key)/>${value} {code} Variable value cannot be reassigned, is it a bug or designed feature? > <#list map as key,value> should always iterating on map entries > --------------------------------------------------------------- > > Key: FREEMARKER-87 > URL: https://issues.apache.org/jira/browse/FREEMARKER-87 > Project: Apache Freemarker > Issue Type: Bug > Components: engine > Affects Versions: 2.3.27-incubating > Reporter: Yanming Zhou > Priority: Major > Attachments: MapIteratingTest.java > > > I'm using struts2, use FriendlyMapModel instead of default=C2=A0MapModel,= It works fine except map have key such as "size",=C2=A0the value will be u= nexpected SimpleMethodModel, I think freemarker should always use entry val= ue=C2=A0for directive=C2=A0<#list map as key,value>, not matter how=C2=A0Ma= pModel works,=C2=A0MapModel should only affect map.size and map.get('size')= . > I attached a test case. > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)