Rule RSPEC-4276 requires the use of specialized functional interfaces whenever possible, ad example changing Function<Long, T> to LongFunction<T>. However, since LongFunction<T> does not extends Function<Long, T>, default methods compose and andThen are missing, therefore
First, let me wish you a nice welcome in our community!
Thanks a lot for your feedback. This is indeed a False-Positive. Once replaced, you won’t be able to call these methods… I created the following ticket to fix this: SONARJAVA-3603
The fix is currently scheduled for our Java analyzer release, expected to be released by the end of the year.