vorburger commented on pull request #985: URL: https://github.com/apache/fineract/pull/985#issuecomment-640209687
> final int TOTAL_SUM to be changed to final int totalSum or you can make it `final static int TOTAL_SUM`, right? Then it's happy - and that's better. FYI in Java, as far as I know, always making all constants `final static` is much better than only `final`, because this saves memory... a `final static` is defined only ONCE in the Class, but a `final` is stored in every INSTANCE of said Class (I think, at least that's probably how it was originally; perhaps nowadays that gets optimized?). For a Test or Service class this doesn't matter (as there is typically only 1 instance of `YourService` or `SomethingTest`), but for a "domain" class of which there are N in production at run-time, this could make a real difference. For consistency, the rule of always making all constants `static final` seems sensible, to me - and is a very widely used pseudo standard convention in Java anyway. ---------------------------------------------------------------- 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]
