Running the "CodePro Default" rule set, the code:
- Code: Select all
return name + " " + height;
Produces the following:
Audit violations for Mountain.java at 3/13/07 2:36 PM
Description,Recommendations,Severity,Resource,Line
String Concatenation [1]
Cannot concatenate Strings Use the class Message to construct the string based on a pattern that can be localized for each locale. Medium Severity Mountain.java Line 60
"Use the class Message" should read "Use the class MessageFormat"
CodePro Analytix version 4.0.6 compiled on 2007.02.21 for Eclipse 3.2
Audit rule set "CodePro Default"
Category "String Concatenation"
Rule "Cannot concatenate strings"
Regards,
-Glen