struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted (JIRA)" <>
Subject [jira] Updated: (WW-1495) Some actions that use Generics make OGNL throw ClassCastException
Date Mon, 12 Mar 2007 19:27:51 GMT


Ted Husted updated WW-1495:

            Flags:   (was: [Patch])
    Fix Version/s:     (was: 2.0.7)

Deflagging this as a patch, since the reporter says that the suggestions should be reviewed
by someone who understands OGNL (which would not be me). 

> Some actions that use Generics make OGNL throw ClassCastException
> -----------------------------------------------------------------
>                 Key: WW-1495
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Actions, Expression Language
>    Affects Versions: 2.0.1
>         Environment: Kubuntu Linux 6.06 and 6.10 running Eclipse 3.2 with Web Tools with
an Apache Tomcat 5.5 integrated into the IDE.
>            Reporter: Vitor Souza
>             Fix For: 2.0.8
>         Attachments: OgnlIssue.war,,
> When the action class extends a class that uses generics (e.g. public class ManageEmployeeAction
extends CrudAction<Employee, Long> { }) and data is sent from the web page (using Struts
Forms built by the tag library) to be set in a property from the class that is inherited from
the superclass and defined as generic (e.g., protected I[] ids;), OGNL cannot determine the
type of the property, falls back to String[] and throws a ClassCastException.
> This issue has been further discussed in the forum:
Attachments are provided to illustrate the issue and propose a starting point for the fix.
However, it should NOT be considered a patch, since the creator of this "hack" doesn't have
enough knowledge of OGNL and Generics to assure its general correctness.

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

View raw message