History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: OGNL-80
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jesse Kuhnert
Reporter: Don Brown
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
OGNL

CastCastException when setting properties on objects that use generics in superclass properties

Created: 19/May/07 11:36 PM   Updated: 03/Nov/07 04:24 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.7.2

Issue Links:
Duplicate
 
This issue is duplicated by:
OGNL-126 Don't call setter properly Critical Resolved


 Description  « Hide
From the original Struts ticket - https://issues.apache.org/struts/browse/WW-1495:

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: http://forums.opensymphony.com/thread.jspa?threadID=48752. 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.

 All   Comments   Change History      Sort Order:
Vladimir A. Balandin - [28/Sep/07 06:15 AM ]
The comment contains demo code.

Jesse Kuhnert - [03/Nov/07 04:24 PM ]
Only available as a snapshot build until released. (http://opencomponentry.com/repository/m2-snapshot-repo/)