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 2021/04/25 14:37:17 UTC

[GitHub] [struts] yasserzamani opened a new pull request #485: [WW-5126] use == instead of .equals in ModelDrivenInterceptor

yasserzamani opened a new pull request #485:
URL: https://github.com/apache/struts/pull/485


   due to refreshing model regardless of potential overridden Object.equals


-- 
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.

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] aleksandr-m commented on pull request #485: [WW-5126] use == instead of .equals in ModelDrivenInterceptor

Posted by GitBox <gi...@apache.org>.
aleksandr-m commented on pull request #485:
URL: https://github.com/apache/struts/pull/485#issuecomment-827137538


   @yasserzamani Can you explain why comparing with `==` is better in this context?


-- 
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.

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



[GitHub] [struts] yasserzamani commented on pull request #485: [WW-5126] use == instead of .equals in ModelDrivenInterceptor

Posted by GitBox <gi...@apache.org>.
yasserzamani commented on pull request #485:
URL: https://github.com/apache/struts/pull/485#issuecomment-827339324


   Thanks for the review @aleksandr-m !
   
   TBH I don't have a strong reason. [I've asked reporter](https://issues.apache.org/jira/browse/WW-5126?focusedCommentId=17329388&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17329388) but no answer yet.
   
   "Moreover the interceptor refresh process is based on call to the equals method and this method may have been redefined, in a JPA context for instance. The replacement is then not systematic and may not be done." he said. No user ever has asked for `.equals` so I guess `.equals` has been selected unintentionally and the reporter has found a valid case that shows that it should be `==`. That was my reasoning.


-- 
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.

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



[GitHub] [struts] yasserzamani commented on pull request #485: [WW-5126] use == instead of .equals in ModelDrivenInterceptor

Posted by GitBox <gi...@apache.org>.
yasserzamani commented on pull request #485:
URL: https://github.com/apache/struts/pull/485#issuecomment-831766034


   I agree @lukaszlenart :+1: I closed it and opened its master counterpart at #486 


-- 
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.

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



[GitHub] [struts] lukaszlenart commented on pull request #485: [WW-5126] use == instead of .equals in ModelDrivenInterceptor

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


   I'm good with that change, yet not sure if this supposed to be introduced into 2.5.x branch - some users can depend on this behaviour (even false one) and minor updates (as 2.5.27 will be) shouldn't introduce backward incompatibility.


-- 
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.

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



[GitHub] [struts] coveralls commented on pull request #485: [WW-5126] use == instead of .equals in ModelDrivenInterceptor

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


   
   [![Coverage Status](https://coveralls.io/builds/39107488/badge)](https://coveralls.io/builds/39107488)
   
   Coverage increased (+0.003%) to 47.316% when pulling **509663717a955669d987ebd3792a0049145a235f on ww_5126_2_5** into **8a26c0d753c3a94d9e5e774c5109f59a5e3d79d6 on struts-2-5-x**.
   


-- 
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.

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



[GitHub] [struts] yasserzamani closed pull request #485: [WW-5126] use == instead of .equals in ModelDrivenInterceptor

Posted by GitBox <gi...@apache.org>.
yasserzamani closed pull request #485:
URL: https://github.com/apache/struts/pull/485


   


-- 
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.

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] coveralls commented on pull request #485: [WW-5126] use == instead of .equals in ModelDrivenInterceptor

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


   
   [![Coverage Status](https://coveralls.io/builds/39107488/badge)](https://coveralls.io/builds/39107488)
   
   Coverage increased (+0.003%) to 47.316% when pulling **509663717a955669d987ebd3792a0049145a235f on ww_5126_2_5** into **8a26c0d753c3a94d9e5e774c5109f59a5e3d79d6 on struts-2-5-x**.
   


-- 
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.

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



[GitHub] [struts] yasserzamani commented on pull request #485: [WW-5126] use == instead of .equals in ModelDrivenInterceptor

Posted by GitBox <gi...@apache.org>.
yasserzamani commented on pull request #485:
URL: https://github.com/apache/struts/pull/485#issuecomment-830789404


   I personally feel it's pretty unlikely that this change breaks someone whose intentionally is depend on `.equals`! but at bottom you know better :+1: please let me know


-- 
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.

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



[GitHub] [struts] lukaszlenart commented on pull request #485: [WW-5126] use == instead of .equals in ModelDrivenInterceptor

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


   The case is that this is unknown till someone will report a problem after upgrading to 2.5.27, I rather would like to be careful and make such potentially breaking changes in 2.6.x. The other thing is the reporter was addressing inconsistency in documentation and he was able to overcome the issue with custom interceptor - which is perfectly fine solution.


-- 
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.

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