StringInstantiation

Avoid instantiating String objects; this is usually unnecessary.

This rule is defined by the following Java class: net.sourceforge.pmd.rules.strings.StringInstantiation

Example:

                

public class Foo {
 private String bar = new String("bar"); // just do a String bar = "bar";
}