Memory
- 'StringBuilder' field
Reports fields of type java.lang.StringBuffer or java.lang.StringBuilder.
- Anonymous class may be a named 'static' inner class
Reports anonymous classes that may be safely replaced with static inner classes.
- Call to 'System.gc()' or 'Runtime.gc()'
Reports System.gc() or Runtime.gc() calls.
- Inner class may be 'static'
Reports inner classes that can be made static.
- Return of instance of anonymous, local or inner class
Reports return statements that return an instance of an anonymous, local, or inner class.
- Static collection
Reports static fields of a Collection type.
- Unnecessary zero length array usage
Reports allocations of arrays with known lengths of zero when there is a constant for that in the class of the array's element type.
- Zero-length array allocation
Reports allocations of arrays with known lengths of zero.
Last modified: 11 September 2024