Re: [Codenarc-developer] UnnecessaryIntegerInstantiation message
Brought to you by:
chrismair
From: Hamlet D. <ham...@ca...> - 2011-01-13 12:49:37
|
Sure, feel free to clarify the message. I suggest "Can probably be rewritten as 1115.37 or 1115.37G" so that developers learn the G suffix forces a type case. Some for "i". -- Hamlet D'Arcy ham...@ca... ----- Original Message ----- > Hamlet, > > In the violation message for the UnnecessaryBigDecimalInstantiation > rule, is the "G" suffix necessary? e.g. > > source: BigDecimal amount = new BigDecimal("1115.37") > message: Can probably be rewritten as 1115.37G > > since Groovy will treat 1115.37 as a BigDecimal by default. > > Likewise, the message for UnnecessaryIntegerInstantiation includes an > "i" suffix after the number. > > Can we remove them or at least further qualify that message. I can > just see developers adding unnecessary "G" and "i" all over the place. > > Chris > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how > you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Codenarc-developer mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-developer |