I think S6517 has false positive detection for JPA or Spring JPA.
Because JpaRepository or CrudRepository has multiple functions.
So the interface that implmented them cannot convert to SAM.
Thanks for reporting this issue. Indeed, this is a false positive, I’ve opened a ticket for it.
You can mark the finding as false positive in the SonarCloud UI and it should not affect your quality gate. If the rule is too noisy you can disable it as a temporary workaround, until we ship a fix.