[
https://issues.apache.org/jira/browse/WW-5196?focusedWorklogId=799108&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-799108
]
ASF GitHub Bot logged work on WW-5196:
--------------------------------------
Author: ASF GitHub Bot
Created on: 08/Aug/22 20:54
Start Date: 08/Aug/22 20:54
Worklog Time Spent: 10m
Work Description: sepe81 commented on code in PR #585:
URL: https://github.com/apache/struts/pull/585#discussion_r940646553
##########
core/src/main/java/org/apache/struts2/dispatcher/ApplicationMap.java:
##########
@@ -167,24 +128,26 @@ public Object get(Object key) {
* @param value the value to set.
* @return the attribute that was just set.
*/
- public Object put(Object key, Object value) {
- Object oldValue = get(key);
- entries = null;
- context.setAttribute(key.toString(), value);
- return oldValue;
- }
+ public Object put(final String key, final Object value) {
Review Comment:
fix tabs to spaces for method put
##########
core/src/main/java/org/apache/struts2/dispatcher/StringObjectEntry.java:
##########
@@ -0,0 +1,46 @@
+package org.apache.struts2.dispatcher;
+
+import java.util.Map.Entry;
+
+abstract class StringObjectEntry implements Entry<String, Object> {
+ private String key;
+ private Object value;
+
+ public StringObjectEntry(final String key, final Object value) {
Review Comment:
```suggestion
StringObjectEntry(final String key, final Object value) {
```
see sonar rule java:S5993
Issue Time Tracking
-------------------
Worklog Id: (was: 799108)
Time Spent: 1h (was: 50m)
> Make RequestMap and ApplicationMap to use generics, also correct SessionMap
> to always be of type <String, Object>
> -----------------------------------------------------------------------------------------------------------------
>
> Key: WW-5196
> URL: https://issues.apache.org/jira/browse/WW-5196
> Project: Struts 2
> Issue Type: Improvement
> Components: Core
> Reporter: Lukasz Lenart
> Assignee: Stefaan Dutry
> Priority: Major
> Fix For: 6.1.0
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> Right now these implementations of {{Map}} doesn't use generics or they are
> created without specifying proper type for key and value
--
This message was sent by Atlassian Jira
(v8.20.10#820010)