You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jeremy Thomerson (JIRA)" <ji...@apache.org> on 2010/08/13 22:22:17 UTC
[jira] Created: (WICKET-2987) WicketTester sets parameter map value
of String, but Request returns String[] and causes ClassCastException
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: Bug
Components: wicket
Affects Versions: 1.5-M1, 1.4.10
Reporter: 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.
[jira] Reopened: (WICKET-2987) WicketTester sets parameter map
value of String, but Request returns String[] and causes ClassCastException
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg reopened WICKET-2987:
-----------------------------------
Assignee: Jeremy Thomerson (was: Igor Vaynberg)
> 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: Bug
> 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.
[jira] Updated: (WICKET-2987) Investigate WicketTester sets
parameter map value of String, but Request returns String[] and causes
ClassCastException
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-2987:
----------------------------------
Comment: was deleted
(was: whoops, wrong resolution)
> 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.
[jira] Reopened: (WICKET-2987) WicketTester sets parameter map
value of String, but Request returns String[] and causes ClassCastException
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg reopened WICKET-2987:
-----------------------------------
whoops, wrong resolution
> 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: Bug
> Components: wicket
> Affects Versions: 1.4.10, 1.5-M1
> Reporter: Jeremy Thomerson
> Assignee: Igor Vaynberg
> 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.
[jira] Updated: (WICKET-2987) Investigate WicketTester sets
parameter map value of String, but Request returns String[] and causes
ClassCastException
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Closed: (WICKET-2987) Investigate WicketTester sets
parameter map value of String, but Request returns String[] and causes
ClassCastException
Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeremy Thomerson closed WICKET-2987.
------------------------------------
Resolution: Cannot Reproduce
until we get a quickstart of some kind, can't proceed
> 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.
[jira] Commented: (WICKET-2987) WicketTester sets parameter map
value of String, but Request returns String[] and causes ClassCastException
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903783#action_12903783 ]
Igor Vaynberg commented on WICKET-2987:
---------------------------------------
also, there are a lot of tests in the core that use formtester, so why dont those exhibit the classcast? this is why we need a quickstart.
> 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: Bug
> Components: wicket
> Affects Versions: 1.4.10, 1.5-M1
> Reporter: Jeremy Thomerson
> Assignee: Igor Vaynberg
> 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.
[jira] Commented: (WICKET-2987) Investigate WicketTester sets
parameter map value of String, but Request returns String[] and causes
ClassCastException
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903847#action_12903847 ]
Igor Vaynberg commented on WICKET-2987:
---------------------------------------
now it wont fall through the cracks, but it also wont look like a bug no one has ever bothered to look into. in the past few days ive closed a bunch of stuff like this that was sitting there for YEARS. if i run a statistic on jira that calculates "average time to close a bug" all this stuff makes wicket look like a project where devs dont care about fixing bugs.
> 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.
[jira] Resolved: (WICKET-2987) WicketTester sets parameter map
value of String, but Request returns String[] and causes ClassCastException
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-2987.
-----------------------------------
Resolution: Incomplete
jeremy, you are a committer :) at least attach a quickstart so someone else can reproduce it, or...fix it :) otherwise these things stay open for years...
> 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: Bug
> Components: wicket
> Affects Versions: 1.4.10, 1.5-M1
> Reporter: Jeremy Thomerson
> Assignee: Igor Vaynberg
> 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.
[jira] Updated: (WICKET-2987) Investigate WicketTester sets
parameter map value of String, but Request returns String[] and causes
ClassCastException
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-2987:
----------------------------------
Comment: was deleted
(was: tried with 1.4.10, when i enter 123456 in the second field i get:
* '123456' is not a valid Date.
* error
)
> 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.
[jira] Commented: (WICKET-2987) WicketTester sets parameter map
value of String, but Request returns String[] and causes ClassCastException
Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903810#action_12903810 ]
Jeremy Thomerson commented on WICKET-2987:
------------------------------------------
I'm planning on it. I was trying to get the client to create the quickstart. I've been away from the office at training classes for two weeks, so I filed this so that it wouldn't fall through the cracks. During that time, I was encouraging them to create a quickstart for it. Either I'll do it or I'll close it, but you don't need to worry about this one.
> 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: Bug
> Components: wicket
> Affects Versions: 1.4.10, 1.5-M1
> Reporter: Jeremy Thomerson
> Assignee: Igor Vaynberg
> 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.
[jira] Commented: (WICKET-2987) WicketTester sets parameter map
value of String, but Request returns String[] and causes ClassCastException
Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902913#action_12902913 ]
Peter Ertl commented on WICKET-2987:
------------------------------------
could you attach the code or a test case?
> 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: Bug
> Components: wicket
> Affects Versions: 1.4.10, 1.5-M1
> Reporter: 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.
[jira] Issue Comment Edited: (WICKET-2987) WicketTester sets
parameter map value of String, but Request returns String[] and causes
ClassCastException
Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903810#action_12903810 ]
Jeremy Thomerson edited comment on WICKET-2987 at 8/28/10 6:12 AM:
-------------------------------------------------------------------
I'm planning on it. I was trying to get the client to create the quickstart. I've been away from the office at training classes for two weeks, so I filed this so that it wouldn't fall through the cracks. During that time, I was encouraging them to create a quickstart for it. Either I'll do it or I'll close it, but you don't need to worry about this one - sorry I thought that was implied by the wording (a committer opening something "a client" sent in).
was (Author: jthomerson):
I'm planning on it. I was trying to get the client to create the quickstart. I've been away from the office at training classes for two weeks, so I filed this so that it wouldn't fall through the cracks. During that time, I was encouraging them to create a quickstart for it. Either I'll do it or I'll close it, but you don't need to worry about this one.
> 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: Bug
> Components: wicket
> Affects Versions: 1.4.10, 1.5-M1
> Reporter: Jeremy Thomerson
> Assignee: Igor Vaynberg
> 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.
[jira] Resolved: (WICKET-2987) WicketTester sets parameter map
value of String, but Request returns String[] and causes ClassCastException
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-2987.
-----------------------------------
Assignee: Igor Vaynberg
Resolution: Cannot Reproduce
tried with 1.4.10, when i enter 123456 in the second field i get:
* '123456' is not a valid Date.
* error
> 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: Bug
> Components: wicket
> Affects Versions: 1.4.10, 1.5-M1
> Reporter: Jeremy Thomerson
> Assignee: Igor Vaynberg
> 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.