Hi,

I have run error prone into the latest source and I have these wrnings

    [javac]
C:\Util\0_perso\JMeterSVN\jmeter\src\core\org\apache\jmeter\report\dashboard\HtmlTemplateExporter.java:120:
warning: [ClassCanBeStatic] Inner class is non-static but does not
reference enclosing class
    [javac]     private class ExtraOptionsResultCustomizer implements
ResultCustomizer {
    [javac]             ^
    [javac]     (see http://errorprone.info/bugpattern/ClassCanBeStatic)
    [javac]   Did you mean 'private static class
ExtraOptionsResultCustomizer implements ResultCustomizer {'?

    [javac]
C:\Util\0_perso\JMeterSVN\jmeter\src\core\org\apache\jmeter\report\dashboard\HtmlTemplateExporter.java:169:
warning: [ClassCanBeStatic] Inner class is non-static but does not
reference enclosing class
    [javac]     private class EmptyGraphChecker implements ResultChecker {
    [javac]             ^
    [javac]     (see http://errorprone.info/bugpattern/ClassCanBeStatic)
    [javac]   Did you mean 'private static class EmptyGraphChecker
implements ResultChecker {'?

    [javac]
C:\Util\0_perso\JMeterSVN\jmeter\src\core\org\apache\jmeter\report\processor\CsvFileSampleSource.java:249:
warning: [ClassCanBeStatic] Inner class is non-static but does not
reference enclosing class
    [javac]     private class PrivateProducer extends
AbstractSampleProcessor implements
    [javac]             ^
    [javac]     (see http://errorprone.info/bugpattern/ClassCanBeStatic)
    [javac]   Did you mean 'private static class PrivateProducer extends
AbstractSampleProcessor implements'?

If we check http://errorprone.info/bugpattern/ClassNewInstance, we can read

The problem

An inner class should be static unless it references members of its
enclosing class. An inner class that is made non-static unnecessarily uses
more memory and does not make the intent of the class clear.


These class should they be static?


If yes, I can made the patch


Thank

Antonio

Reply via email to