in a number of classes eg.
org.eclipse.jdt.internal.corext.refactoring.code.ConvertAnonymousToNestedRefactoring.createRefactoringDescriptor()
A boxed primitive is allocated just to call toString(). It is more
effective to just use the staticform of toString which takes the
primitive value. So,
Replace...
With this...
new Integer(1).toString() Integer.toString(1)
new Long(1).toString() Long.toString(1)
new Float(1.0).toString() Float.toString(1.0)
new Double(1.0).toString() Double.toString(1.0)
new Byte(1).toString() Byte.toString(1)
new Short(1).toString() Short.toString(1)
new Boolean(true).toString() Boolean.toString(true)
Rank: Of Concern (16), confidence: High
Pattern: DM_BOXED_PRIMITIVE_TOSTRING
Type: Bx, Category: PERFORMANCE (Performance)
Change-Id: Ibf55b4dcbf09f987610a7ed9057b1faf0dda85d2
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>