Private final methods that do not access instance fields should be declared static.
Since the method is private and final, it can't possibly be overridden. Therefore, the only possible definition of the method that exists doesn't access any instance fields. So we can safely declare it as static.
public class Klass {
private final int aField = 10;
private final void method() {
// ...statements that do not access `aField`
}
}
Consider declaring the method static.
public class Klass {
private final int aField = 10;
private static final void method() {
// ...statements that do not access `aField`
}
}