You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by GitBox <gi...@apache.org> on 2022/08/06 18:35:20 UTC

[GitHub] [struts] sdutry opened a new pull request, #585: WW-5196 use generics for RequestMap and ApplicationMap

sdutry opened a new pull request, #585:
URL: https://github.com/apache/struts/pull/585

   Assumption: 
   - keys will always be Strings
   
   Extracted abstract class for similar logic for entries


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


[GitHub] [struts] lukaszlenart commented on pull request #585: WW-5196 use generics for RequestMap and ApplicationMap and correct SessionMap to also be of type

Posted by "lukaszlenart (via GitHub)" <gi...@apache.org>.
lukaszlenart commented on PR #585:
URL: https://github.com/apache/struts/pull/585#issuecomment-1465564328

   > Can not get the java 11 build succeeding due to the following error :
   > 
   > ```
   > Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project struts2-parent: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator
   > ```
   
   Thanks a lot @sdutry the issue with JDK11 is related to GH Action token access and can be ignored.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [struts] sdutry commented on pull request #585: WW-5196 use generics for RequestMap and ApplicationMap and correct SessionMap to also be of type

Posted by "sdutry (via GitHub)" <gi...@apache.org>.
sdutry commented on PR #585:
URL: https://github.com/apache/struts/pull/585#issuecomment-1465133055

   I'll try and do it tonight 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [struts] lukaszlenart commented on pull request #585: WW-5196 use generics for RequestMap and ApplicationMap

Posted by GitBox <gi...@apache.org>.
lukaszlenart commented on PR #585:
URL: https://github.com/apache/struts/pull/585#issuecomment-1208033645

   > just wondering if i should adjust SessionMap accordingly since, as far as i can see, it should only have String keys too.
   
   Yes, please - adjust description of the ticket as well, thanks a lot!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [struts] sepe81 commented on a diff in pull request #585: WW-5196 use generics for RequestMap and ApplicationMap and correct SessionMap to also be of type

Posted by GitBox <gi...@apache.org>.
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 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [struts] lukaszlenart commented on pull request #585: WW-5196 use generics for RequestMap and ApplicationMap and correct SessionMap to also be of type

Posted by "lukaszlenart (via GitHub)" <gi...@apache.org>.
lukaszlenart commented on PR #585:
URL: https://github.com/apache/struts/pull/585#issuecomment-1464867384

   @sdutry could rebase this PR? We switched from Travis to GH Actions to validate PRs, thanks in advance!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [struts] lukaszlenart commented on pull request #585: WW-5196 use generics for RequestMap and ApplicationMap

Posted by GitBox <gi...@apache.org>.
lukaszlenart commented on PR #585:
URL: https://github.com/apache/struts/pull/585#issuecomment-1207361129

   Nice 👏 but I would wait with merging this till 6.0.1 is out.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [struts] coveralls commented on pull request #585: WW-5196 use generics for RequestMap and ApplicationMap

Posted by GitBox <gi...@apache.org>.
coveralls commented on PR #585:
URL: https://github.com/apache/struts/pull/585#issuecomment-1207262727

   
   [![Coverage Status](https://coveralls.io/builds/51468468/badge)](https://coveralls.io/builds/51468468)
   
   Coverage increased (+0.008%) to 50.669% when pulling **6ba4432fbe8c88cd2569e7a705bd716dd0723768 on sdutry:issue/WW-5196** into **de3dabbe443ae70c083f7313ba0bd74f0a3222e5 on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [struts] sdutry commented on pull request #585: WW-5196 use generics for RequestMap and ApplicationMap and correct SessionMap to also be of type

Posted by "sdutry (via GitHub)" <gi...@apache.org>.
sdutry commented on PR #585:
URL: https://github.com/apache/struts/pull/585#issuecomment-1465288375

   @lukaszlenart tried to merge in master to get it up to date again.
   
   I had to change a test concerning the nonce in order to get that test running again, not comfortable with having to do a change there, don't think i touched anything there. (`FreemarkerResultMockedTest.testNonce`)
   
   Can not get the java 11 build succeeding due to the following error :
   ```
   Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project struts2-parent: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [struts] kusalk commented on pull request #585: WW-5196 use generics for RequestMap and ApplicationMap and correct SessionMap to also be of type

Posted by "kusalk (via GitHub)" <gi...@apache.org>.
kusalk commented on PR #585:
URL: https://github.com/apache/struts/pull/585#issuecomment-1465127739

   @sdutry Definitely still relevant as I was about to put up a PR for the same but then noticed yours. If you've no time I'd be happy to rebase it for you :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [struts] kusalk commented on pull request #585: WW-5196 use generics for RequestMap and ApplicationMap and correct SessionMap to also be of type

Posted by "kusalk (via GitHub)" <gi...@apache.org>.
kusalk commented on PR #585:
URL: https://github.com/apache/struts/pull/585#issuecomment-1454341023

   LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [struts] sdutry commented on pull request #585: WW-5196 use generics for RequestMap and ApplicationMap

Posted by GitBox <gi...@apache.org>.
sdutry commented on PR #585:
URL: https://github.com/apache/struts/pull/585#issuecomment-1207425177

   Sure, no problem with waiting, just wondering if i should adjust SessionMap accordingly since, as far as i can see, it should only have String keys too.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [struts] sdutry commented on pull request #585: WW-5196 use generics for RequestMap and ApplicationMap and correct SessionMap to also be of type

Posted by "sdutry (via GitHub)" <gi...@apache.org>.
sdutry commented on PR #585:
URL: https://github.com/apache/struts/pull/585#issuecomment-1464889849

   @lukaszlenart i'll der what i can do and if it's still relevant when i find a moment


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [struts] lukaszlenart merged pull request #585: WW-5196 use generics for RequestMap and ApplicationMap and correct SessionMap to also be of type

Posted by "lukaszlenart (via GitHub)" <gi...@apache.org>.
lukaszlenart merged PR #585:
URL: https://github.com/apache/struts/pull/585


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org