You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Gabriel Belingueres (JIRA)" <ji...@apache.org> on 2008/04/18 21:28:05 UTC

[jira] Commented: (WW-2581) add generics to RequestAware, SessionAware, and ParameterAware

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

Gabriel Belingueres commented on WW-2581:
-----------------------------------------

It's a nice addition.

ApplicationAware would be a good candidate too.

May I suggest the creation of a DistributableSessionAware interface with the following method?

DistributableSessionAware.setSession(Map<String,java.io.Serializable> session);


> 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
>            Priority: Minor
>
> 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.