RodrigoDLopez commented on issue #4596: URL: https://github.com/apache/cloudstack/issues/4596#issuecomment-792282785
> I don't fully agree with the rigorous removal of `final` but good job @RodrigoDLopez . As for `final`, I'd put it in unless, rather that leave it out until... Can you please tell me why we need to use FINAL keyword in every variable? as far as I know, we just need to use it in variables that we dont wanna change its value during the execution. ``` When to use a final variable : The only difference between a normal variable and a final variable is that we can re-assign value to a normal variable but we cannot change the value of a final variable once assigned. Hence final variables must be used only for the values that we want to remain constant throughout the execution of program. ``` In addition, the indiscriminate use of FINAL makes it difficult to create unit tests I would appreciate it immensely if you could technically explain to me why we use FINAL in this (incorrect) way throughout the project. > @RodrigoDLopez we've our checkstyle plugin for this. For all new code I agree your suggestions can be reviewed and enforced. I don't however agree with all the suggestions. I know about the checkstyle plugin... but I want to apply what we are talking about in all the ACS project, including the old files. With what suggestions you do not agree? can you please explain me why? ---------------------------------------------------------------- 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: [email protected]
