S1604: FalsePositive if method has type parameters

java

(Holger Mensch) #1

Sonar rule S1604 raises an issue to convert an anonymous inner class to a lambda even if the method has type parameters.
But lambda expression cannot be used in this case.

See: https://stackoverflow.com/questions/22588518/lambda-expression-and-generic-method

Versions:

  • SonarQube: Version 6.7.2 (build 37468)
  • SonarJava: 5.11 (build 17289)