You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2021/06/04 13:55:07 UTC

[GitHub] [logging-log4j2] arturobernalg opened a new pull request #506: Make Local variable and parameter final

arturobernalg opened a new pull request #506:
URL: https://github.com/apache/logging-log4j2/pull/506


   


-- 
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] [logging-log4j2] rgoers commented on pull request #506: Make Local variable and parameter final

Posted by GitBox <gi...@apache.org>.
rgoers commented on pull request #506:
URL: https://github.com/apache/logging-log4j2/pull/506#issuecomment-855148181


   I just looked at the style guidelines and was surprised to see that it doesn't say anything about final. I know Gary had a thing about making stuff final.  For the most part, I've never cared. I understand the advantage of it but I also find it irritating when I want to modify a local variable and it is declared final.


-- 
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] [logging-log4j2] carterkozak commented on pull request #506: Make Local variable and parameter final

Posted by GitBox <gi...@apache.org>.
carterkozak commented on pull request #506:
URL: https://github.com/apache/logging-log4j2/pull/506#issuecomment-854839601


   Can you describe why this is necessary? I had thought that java 8+ "effectively final" variables were equivalent at runtime, but I may be mistaken.


-- 
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] [logging-log4j2] arturobernalg commented on pull request #506: Make Local variable and parameter final

Posted by GitBox <gi...@apache.org>.
arturobernalg commented on pull request #506:
URL: https://github.com/apache/logging-log4j2/pull/506#issuecomment-854854147


   > runtime
   
   HI @carterkozak
   The idea behind this is keep the code simple, avoid possible programing errors by changes the reference or reassigned the variable. 
   TY 


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