
resources.report.rules.pmd.AvoidStringBufferField.html Maven / Gradle / Ivy
AvoidStringBufferField
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;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy