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/07 22:43:58 UTC
[jira] Created: (WW-2581) add generics to RequestAware,
SessionAware, and ParameterAware
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.
[jira] Resolved: (WW-2581) add generics to RequestAware,
SessionAware, and ParameterAware
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown resolved WW-2581.
---------------------------
Resolution: Fixed
Fix Version/s: 2.1.2
Assignee: Don Brown
Again, good idea, thanks Bob
> 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
>
>
> 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.
[jira] Commented: (WW-2581) add generics to RequestAware,
SessionAware, and ParameterAware
Posted by "Gabriel Belingueres (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (WW-2581) add generics to RequestAware,
SessionAware, and ParameterAware
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43714#action_43714 ]
Don Brown commented on WW-2581:
-------------------------------
Patch applied, thanks. As for marking it as closed, it isn't necessary.
> 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.
[jira] Commented: (WW-2581) add generics to RequestAware,
SessionAware, and ParameterAware
Posted by "Brad Cupit (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43715#action_43715 ]
Brad Cupit commented on WW-2581:
--------------------------------
Very cool! Thanks Don!
> 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.
[jira] Updated: (WW-2581) add generics to RequestAware,
SessionAware, and ParameterAware
Posted by "Brad Cupit (JIRA)" <ji...@apache.org>.
[ 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.