"class Message" - Error in audit result recomendat

CodePro AnalytiX (Audit & Test), includes over 1000 audit rules and metrics, JUnit test generation & editing, code coverage, and duplicate code analysis

Moderators: gnebling, jwren, Eric Clayberg, Dan Rubel, Brian Wilkerson, dcarew

"class Message" - Error in audit result recomendat

Postby gihrig » Thu Mar 15, 2007 10:31 am

Nit picking I suppose, but...

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

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"


Posts: 6
Joined: Mon Dec 18, 2006 11:15 am

Postby Brian Wilkerson » Thu Mar 15, 2007 11:14 am

While it might seem like nit picking, it could be confusing to programmers not familiar with Java's internationalization support. Thanks for pointing it out. It will be fixed in the next build.
Brian Wilkerson
Google, Inc.
Brian Wilkerson
Posts: 32
Joined: Fri Apr 28, 2006 9:37 am

Return to CodePro AnalytiX & PlusPak. EclipsePro Audit & Test

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest