struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Saqib Chaudhary (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (WW-1960) action tag violates ParameterAware contract
Date Thu, 02 Apr 2009 14:14:06 GMT

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

Saqib Chaudhary edited comment on WW-1960 at 4/2/09 7:12 AM:
-------------------------------------------------------------

In case we are passing application objects to the action tag. This fix in ActionComponent
breaks by converting our application object to a string (toString method). Making Ognl throw
"no such method setMyObject([Ljava.lang.String;)" exception.

Works well for Integer for example because the toString method of Integer is the value of
that Integer. Is this the desired result??

      was (Author: saqib):
    In case we are passing application objects to the action tag. This fix in ActionComponent
breaks but converting our application object to a string (toString method). Works well for
Integer for example because the toString method of Integer is the value of that Integer. 
  
> action tag violates ParameterAware contract
> -------------------------------------------
>
>                 Key: WW-1960
>                 URL: https://issues.apache.org/struts/browse/WW-1960
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10
>         Environment: linux,jdk1.5,tomcat5.5
>            Reporter: David Mansfield
>            Assignee: Don Brown
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> the javadoc for ParameterAware states that the values of the map are all java.lang.String[],
in other words it is a Map<String,String[]>.  Indeed, when hitting an action via a 'genuine'
http request, this is true.  However, when hitting the action via the action tag, the values
in the map are String, not String[].  The bug appears to be possibly line 177 in ActionComponent:
> 176:        if (parameters != null) {
> 177:            newParams.putAll(parameters);
> 178:        }
> The parameters of the component are Map<String,String> and therefore cannot be
combined directly into the ActionContext.getParameters map.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message