You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/01/18 14:09:06 UTC

[GitHub] [commons-rng] garydgregory commented on pull request #81: Minor Improvement:

garydgregory commented on pull request #81:
URL: https://github.com/apache/commons-rng/pull/81#issuecomment-762273653


   Each component has it's own rule but in general, I prefer to see "final" so
   I don't have to think about looking for a reassignment when I look at a
   longer method. See
   https://garygregory.wordpress.com/2013/01/26/the-final-kiss-in-java/
   
   Gary
   
   On Mon, Jan 18, 2021, 08:28 Alex Herbert <no...@github.com> wrote:
   
   > The change to use final method arguments is a style change. We already use
   > code style checks using the PMD rule AvoidReassigningParameters to ensure
   > method arguments are effectively final. The gratuitous use of final does
   > not add functionality to the code and in keeping with the source code for
   > the JDK we have chosen not to add final in front of everything in the
   > source.
   >
   > Also note that using an IDE to refactor all the code to add final has now
   > broken code style formatting (see checkstyle failures on Travis) due to
   > line length changes.
   >
   > I would remove all the use of final from all method arguments as this is
   > already enforced by build checks. Then it is easy to see in the PR what is
   > left to make final as local or instance variables.
   >
   > —
   > You are receiving this because you are subscribed to this thread.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/commons-rng/pull/81#issuecomment-762250958>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AAJB6N67UEV67NBHC4JFMTLS2QZRBANCNFSM4WHAJJOA>
   > .
   >
   


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