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

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



UnnecessaryConversionTemporary


UnnecessaryConversionTemporary

Avoid unnecessary temporaries when converting primitives to Strings

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

Example:

                
  
public String convert(int x) {
  // this wastes an object
  String foo = new Integer(x).toString();
  // this is better
  return Integer.toString(x);
}
 
      
            




© 2015 - 2025 Weber Informatics LLC | Privacy Policy