There is no point in setting class fields to null in a finalizer. If this this is a hint to the garbage collector, it is unnecessary -
the object will be garbage collected anyway - and doing so may actually cause extra work for the garbage collector.
public class Foo {
private String name;
@Override
void finalize() {
name = null; // Noncompliant; completely unnecessary