Community
Participate
Working Groups
Build ID: 3.2.1 Steps To Reproduce: public class Foo { public void cleanup() { // ... } private final Object finalizerGuardian = new Object() { protected void finalize() { cleanup(); } }; } More information: This is a finalizer guardian as described in Bloch's Effective Java (item 6). There should not be a warning for this, and one cannot remove the field without any side effect as the quick fix states.
Indeed in this code sample, field 'finalizerGuardian' is written, but it is never read. The warning looks correct to me.