[ 
https://issues.apache.org/jira/browse/WW-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082580#comment-15082580
 ] 

ASF subversion and git services commented on WW-3010:
-----------------------------------------------------

Commit 1d3d7be4668e66314f7385a2b73f1c3a7dff66dd in struts's branch 
refs/heads/master from Victor Sosa
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=1d3d7be ]

Fix for WW-4312

A problem on Iterator tag


and  WW-3010 s:iterator fails to iterate over collections containing
null 

> s:iterator fails to iterate over collections containing null
> ------------------------------------------------------------
>
>                 Key: WW-3010
>                 URL: https://issues.apache.org/jira/browse/WW-3010
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14
>         Environment: any
>            Reporter: Daniel Baldes
>             Fix For: 2.5
>
>
> When using the struts2 taglib's iterator tag to iterate over a collection 
> which contains nulls, the current value ("id") is not set to null, but to the 
> value it had in the last iteration before. This behaviour is explicitly coded 
> without any obvious reason. See IteratorComponent.java from line 219:
> {code:java}
>             if ((id != null) && (currentValue != null)) {
>                 //pageContext.setAttribute(id, currentValue);
>                 //pageContext.setAttribute(id, currentValue, 
> PageContext.REQUEST_SCOPE);
>                 stack.getContext().put(id, currentValue);
>             }
> {code}
> Expected behaviour: just iterate over the null values as a plain java 
> iterator would.
> If nulls are forbidden for some important reason, it should throw an 
> execption, but not return a wrong value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to