You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2010/08/28 19:38:53 UTC
[jira] Updated: (WICKET-2987) Investigate WicketTester sets
parameter map value of String, but Request returns String[] and causes
ClassCastException
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-2987:
----------------------------------
Summary: Investigate WicketTester sets parameter map value of String, but Request returns String[] and causes ClassCastException (was: WicketTester sets parameter map value of String, but Request returns String[] and causes ClassCastException)
Issue Type: Task (was: Bug)
> Investigate WicketTester sets parameter map value of String, but Request returns String[] and causes ClassCastException
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: WICKET-2987
> URL: https://issues.apache.org/jira/browse/WICKET-2987
> Project: Wicket
> Issue Type: Task
> Components: wicket
> Affects Versions: 1.4.10, 1.5-M1
> Reporter: Jeremy Thomerson
> Assignee: Jeremy Thomerson
> Priority: Minor
>
> This was sent to me from a client, and after a quick look, appears to be valid:
> Jeremy,
>
> When FormTester is used and you add a component to it, the logic in FormTester adds the component name and value into the MockHttpServletRequest (which will be a String as the key and a String as a value). My issue with this is that later, we have a RequestCodingStrategy which gets the parameterMap from the Request which its typed as <String, String[]>. When we iterate over this, we get a classcast exception when the String (From the form) is attempted to be converted into a String[]. I think something needs to improved in the Wicket Request object hierarchy to ensure this can't happen. For now I have just changed my logic in the RequestCodingStrategy to check for the String[] type.
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.