I've just started using SonarQube for improving my code quality and when I analyzed a JavaFx project that uses ControlsFX for validation I got this "code smell" error.
Replace this lambda with a method reference:
support.getValidationResult().getErrors().forEach(error ->
support.getValidationDecorator().applyValidationDecoration(error));
I'm unsure on how to refactor this since the ValidationSupport class does not have any static methods and my IDE is giving me this warning for most of what I'm tying to do:
The type ValidationSupport does not define getValidationDecorator(ValidationMessage) that is applicable here
For the time being I've just marked it down as a false positive in Sonar but that's not a good solution in the long run since it just hides it.