All Downloads are FREE. Search and download functionalities are using the official Maven repository.

resources.report.rules.pmd.AvoidDuplicateLiterals.html Maven / Gradle / Ivy



AvoidDuplicateLiterals

AvoidDuplicateLiterals

Code containing duplicate String literals can usually be improved by declaring the String as a constant field.

This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.strings.AvoidDuplicateLiteralsRule

Example(s):


private void bar() {
     buz("Howdy");
     buz("Howdy");
     buz("Howdy");
     buz("Howdy");
 }
 private void buz(String x) {}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy