resources.report.rules.pmd.MethodArgumentCouldBeFinal.html Maven / Gradle / Ivy
MethodArgumentCouldBeFinal
MethodArgumentCouldBeFinal
A method argument that is never re-assigned within the method can be declared final.
This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.optimizations.MethodArgumentCouldBeFinalRule
Example(s):
public void foo1 (String param) { // do stuff with param never assigning it
}
public void foo2 (final String param) { // better, do stuff with param never assigning it
}