UnnecessaryMethodReference
This method reference is unnecessary, and can be replaced with the variable itself.

Severity
WARNING
Has Fix?

The problem

Using a method reference to refer to the abstract method of the target type is unnecessary. For example,

Stream<Integer> filter(Stream<Integer> xs, Predicate<Integer> predicate) {
  return xs.filter(predicate::test);
}
Stream<Integer> filter(Stream<Integer> xs, Predicate<Integer> predicate) {
  return xs.filter(predicate);
}

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("UnnecessaryMethodReference") to the enclosing element.