struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4312) A problem on Iterator tag
Date Mon, 04 Jan 2016 22:18:39 GMT

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

ASF GitHub Bot commented on WW-4312:
------------------------------------

GitHub user victorsosa opened a pull request:

    https://github.com/apache/struts/pull/69

    Patch WW-4312  A problem on Iterator tag

    Allow null values in the iterator tag

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/victorsosa/struts patch

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/struts/pull/69.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #69
    
----
commit b257250036c05233d072c69189258a69f68ee057
Author: Victor Sosa <victornsosa@gmail.com>
Date:   2016-01-02T19:34:06Z

     fix for WW-4573
    
    NPE/ concurrent modification exception
    
    using a CopyOnWriteArrayList. This is to keep Memory consistency on the
    ValueStack.

commit 1d3d7be4668e66314f7385a2b73f1c3a7dff66dd
Author: Victor Sosa <victornsosa@gmail.com>
Date:   2016-01-04T22:03:47Z

    Fix for WW-4312
    
    A problem on Iterator tag
    
    
    and  WW-3010 s:iterator fails to iterate over collections containing
    null

commit e2ae94cc0f260b85d5162d749f047c8cbcc9e58c
Author: Victor Sosa <victornsosa@gmail.com>
Date:   2016-01-04T22:07:47Z

    Merge branch 'patch' of github.com:victorsosa/struts into patch

commit bdc325b03d17a6ec8bc6f19ecb0f0e9854749502
Author: victor sosa <victorsosa@users.noreply.github.com>
Date:   2016-01-04T22:08:24Z

    Merge pull request #2 from apache/master
    
    Merge changes

commit 1e21b7ec1b04af84e31f7136e88663bc670a502e
Author: Victor Sosa <victornsosa@gmail.com>
Date:   2016-01-04T22:12:57Z

    Merge branch 'patch' of github.com:victorsosa/struts into patch

----


> A problem on Iterator tag
> -------------------------
>
>                 Key: WW-4312
>                 URL: https://issues.apache.org/jira/browse/WW-4312
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.3.15
>            Reporter: K OSSUser
>            Priority: Minor
>             Fix For: 2.5
>
>
> I can't explain well so see below.
> Expected "1, 2, , 3," but the result was "1, 2, 2, 3,".
> Test.jsp
> -------------------------------------------------------------------
> <s:iterator value="%{{{1, 2},{null, 3}}}" var="var1">
> <s:iterator value="#var1" var="var2">
> <s:property value="#var2" />,
> </s:iterator>
> </s:iterator>
> -------------------------------------------------------------------
> I changed below class then it was fixed.
> org.apache.struts2.components.IteratorComponent#start
> -------------------------------------------------------------------
> //  if ((var != null) && (currentValue != null)) { <= Old.
>     if (var != null) { // <= New.
>         //pageContext.setAttribute(id, currentValue);
>         //pageContext.setAttribute(id, currentValue, PageContext.REQUEST_SCOPE);
>         putInContext(currentValue);
>     }
> -------------------------------------------------------------------



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

Mime
View raw message