resources.report.rules.pmd.StringInstantiation.html Maven / Gradle / Ivy
StringInstantiation
StringInstantiation
Avoid instantiating String objects; this is usually unnecessary since they are immutable and can be safely shared.
This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.strings.StringInstantiationRule
Example(s):
private String bar = new String("bar"); // just do a String bar = "bar";