struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-3676) javatemplates - no radiobutton is selected if property 'name' is not of type integer or string (e.g. short)
Date Mon, 20 May 2013 13:21:19 GMT

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

Hudson commented on WW-3676:
----------------------------

Integrated in Struts2-JDK6 #705 (See [https://builds.apache.org/job/Struts2-JDK6/705/])
    WW-3676 Uses simple toString() for non-null objects to support other types than String
and Integer (Revision 1484461)

     Result = FAILURE
lukaszlenart : 
Files : 
* /struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/RadioHandler.java

                
> javatemplates - no radiobutton is selected if property 'name' is not of type integer
or string (e.g. short)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3676
>                 URL: https://issues.apache.org/jira/browse/WW-3676
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Java Templates
>    Affects Versions: 2.2.3
>            Reporter: lars geidel
>            Assignee: Lukasz Lenart
>             Fix For: 2.3.15
>
>
> org.apache.struts2.views.java.simple.RadioHandler:62
> //Namevalue needs to cast to a string from object. It's object because the 
> //Property can be defined as String or as Integer
> {code:java}
> String itemNameValueStr;
> if (nameValue instanceof java.lang.Integer || nameValue instanceof java.lang.String)
>     itemNameValueStr = nameValue.toString();
> else
>     itemNameValueStr = null;
> {code}
> possible sollution?:
> {code:java}
> String itemNameValueStr = StringUtils.defaultString(nameValue == null ? null : nameValue.toString());
> {code}

--
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

Mime
View raw message