You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: [LambdaMethodReference] Lambda should be a method reference
version: gradle-baseline-java 1.16.0
What did you want to happen?
No warning printed. Unless I'm missing something, I don't see a way to convert this expression to a method reference. This would be functionally not equivalent:
foo.getBar()::baz
The text was updated successfully, but these errors were encountered:
Ah! Requiring static methods will fix this issue, though is there any reason we would want to rewrite (or suggest a rewrite for) chained method calls in a lambda at all?
I guess a better phrasing of my question is why were chained method invocations considered in the first place (before the switch to only allowing static method invocations), and should we add an additional check to the code to immediately return on chained method invocations, in case you eventually revert the static method restriction? In any case, this issue will be fixed by #771, no additional work required.
What happened?
Lambda expression:
Warning printed:
version: gradle-baseline-java 1.16.0
What did you want to happen?
No warning printed. Unless I'm missing something, I don't see a way to convert this expression to a method reference. This would be functionally not equivalent:
The text was updated successfully, but these errors were encountered: