jdanekrh commented on issue #2651: ARTEMIS-2320 Fix ClassCanBeStatic errorprone warning URL: https://github.com/apache/activemq-artemis/pull/2651#issuecomment-487690177 The purpose of the warning isn't really to point out style issues about class hierarchy, but a potential (tiny) performance issue, which is fixed by just adding `static` everywhere. > A non-static inner class has a reference to its outer class, and access to the outer class' fields and methods. That class reference makes the inner class larger and could cause the outer class instance to live in memory longer than necessary. https://rules.sonarsource.com/java/tag/performance/RSPEC-2694 Another thing, does anybody ever read those warnings? They don't show in IntelliJ (they don't show for me) and they get lost in mvn output... I don't consider this PR very important, and it was easy to produce (IntelliJ autofix), so I don't mind closing it and wait for the eventual comprehensive refactoring.
---------------------------------------------------------------- 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] With regards, Apache Git Services
