You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2012/09/20 14:28:07 UTC

[jira] [Created] (WICKET-4775) PageParameters#mergeWith may loose values of the 'other' PP

Martin Grigorov created WICKET-4775:
---------------------------------------

             Summary: PageParameters#mergeWith may loose values of the 'other' PP
                 Key: WICKET-4775
                 URL: https://issues.apache.org/jira/browse/WICKET-4775
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 6.0.0, 1.5.8
            Reporter: Martin Grigorov
            Assignee: Emond Papegaaij


The code at org.apache.wicket.request.mapper.parameter.PageParameters#mergeWith() looks like:

for (NamedPair curNamed : other.getAllNamed())
		set(curNamed.getKey(), curNamed.getValue());

may loose some values if 'other' has a named parameter with several values.With the current code only the last name/value pair is preserved.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-4775) PageParameters#mergeWith may loose values of the 'other' PP

Posted by "Emond Papegaaij (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emond Papegaaij resolved WICKET-4775.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.1.0

The merge method now first removes named keys and adds them from 'other'. This preserves multiple values in 'other'.

While fixing this bug, I've also discovered and fixed a bug in merging index parameters: if this contains '0' and '1' and other contains '1' and '2', the value under '0' was overwritten with null.
                
> PageParameters#mergeWith may loose values of the 'other' PP
> -----------------------------------------------------------
>
>                 Key: WICKET-4775
>                 URL: https://issues.apache.org/jira/browse/WICKET-4775
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.8, 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Emond Papegaaij
>             Fix For: 6.1.0
>
>
> The code at org.apache.wicket.request.mapper.parameter.PageParameters#mergeWith() looks like:
> for (NamedPair curNamed : other.getAllNamed())
> 		set(curNamed.getKey(), curNamed.getValue());
> may loose some values if 'other' has a named parameter with several values.With the current code only the last name/value pair is preserved.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira