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

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";





© 2015 - 2024 Weber Informatics LLC | Privacy Policy