You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Brad Cupit (JIRA)" <ji...@apache.org> on 2008/04/21 15:23:05 UTC
[jira] Updated: (WW-2581) add generics to RequestAware,
SessionAware, and ParameterAware
[ https://issues.apache.org/struts/browse/WW-2581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brad Cupit updated WW-2581:
---------------------------
Attachment: ApplicationAware.patch
Awesome! thanks for fixing it! I didn't realize that ParameterAware had already been updated to use generics in trunk.
In a comment, Gabriel mentioned ApplicationAware would be a good idea too, and I think he's right. I attached the patch for ApplicationAware.
(as for the DistributableSessionAware interface that Gabriel mentioned, that should probably be in a separate bug report/feature request where it could be commented on)
As the original bug submitter, should I mark the bug as 'closed' once it's all wrapped up?
> add generics to RequestAware, SessionAware, and ParameterAware
> --------------------------------------------------------------
>
> Key: WW-2581
> URL: https://issues.apache.org/struts/browse/WW-2581
> Project: Struts 2
> Issue Type: Improvement
> Components: Core Interceptors
> Reporter: Brad Cupit
> Assignee: Don Brown
> Priority: Minor
> Fix For: 2.1.2
>
> Attachments: ApplicationAware.patch
>
>
> Since Struts2 targets Java 1.5, it would be great if RequestAware, SessionAware, and ParameterAware could be updated to use generics.
> Each defines a setter which takes a Map, but the Map does not use generics.
> Problem:
> When implementing these methods, developers must add a @SuppressWarnings("unchecked") to the method to compile without warnings.
> Suggested fix: change the method signatures to use generics.
> RequestAware.setRequest(Map<String, Object> request);
> SessionAware.setSession(Map<String, Object> session);
> ParameterAware.setParameters(Map<String, String[]> parameters);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.