Avoid useless final type in interface method

Metadata

ID: java-code-style/final-param-in-abstract-method

Language: Java

Severity: Notice

Category: Code Style

Description

For a method in an interface, declaring a parameter of a method as final serves no purpose as the implementation may not respect it.

Non-Compliant Code Examples

public interface FooInterface {
  void process(final Object arg); // Avoid using final here
}

Compliant Code Examples

public interface FooInterface {
  void process(Object arg);
}