Skip to content

FI_FINALIZER_NULLS_FIELDS false positive #3207

@szegedi

Description

@szegedi

I'm getting a FI_FINALIZER_NULLS_FIELDS because I'm nulling a field in a method with signature

	private void finalize(Gatherer.Downstream<? super List<T>> downstream)

However, while this method is named "finalize", it is not an override of protected void finalize() in java.lang.Object, so this is a false positive.

(For context, I'm implementing a stream gatherer and had a method named "finalize" for a method handle passed as a "finisher" parameter to Gatherer.of(initializer, integrator, finisher). I'll rename it to "finish" to avoid this false positive, but the point remains that the rule misidentified a method as the class instance finalizer.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions