AvoidStringBufferField

[ StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time).

This rule is defined by the following XPath expression:


//FieldDeclaration/Type/ReferenceType/ClassOrInterfaceType[@Image = 'StringBuffer']

			

Example:

                

class Foo {
	private StringBuffer memoryLeak;
}