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

Mark B edited comment on WW-3010 at 4/15/09 3:31 PM:
-----------------------------------------------------

Musachy, I think this is a dangerous mentality. There are probably many more 
apps coded expecting correct behavior than coded to rely on incorrect behavior.

If we are iterating over a list whose first element is a null, we should get a 
null as the first value.

      was (Author: z5h):
    Musachy, I think this is a dangerous mentality. There are probably many 
more apps coded expecting correct behavior than coded to rely on incorrect 
behavior.

If we are iterating over a list whose first element is a null, we should get a 
null as the first value. End of discussion.
  
> s:iterator fails to iterate over collections containing null
> ------------------------------------------------------------
>
>                 Key: WW-3010
>                 URL: https://issues.apache.org/struts/browse/WW-3010
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14
>         Environment: any
>            Reporter: Daniel Baldes
>
> 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:
>             if ((id != null) && (currentValue != null)) {
>                 //pageContext.setAttribute(id, currentValue);
>                 //pageContext.setAttribute(id, currentValue, 
> PageContext.REQUEST_SCOPE);
>                 stack.getContext().put(id, currentValue);
>             }
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to