-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid @UnnecessaryLambda
patch suggestion
#2518
Comments
jingjing-0919
added a commit
to jingjing-0919/error-prone
that referenced
this issue
May 29, 2022
Closed
copybara-service bot
pushed a commit
that referenced
this issue
Sep 15, 2023
#2518 PiperOrigin-RevId: 565728375
copybara-service bot
pushed a commit
that referenced
this issue
Sep 15, 2023
#2518 PiperOrigin-RevId: 565728375
copybara-service bot
pushed a commit
that referenced
this issue
Sep 15, 2023
#2518 PiperOrigin-RevId: 565728375
copybara-service bot
pushed a commit
that referenced
this issue
Sep 15, 2023
#2518 PiperOrigin-RevId: 565804153
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the following code:
Compile the code as follows:
javac \ -XDcompilePolicy=simple \ -processorpath error_prone_core-2.9.0-with-dependencies.jar \ '-Xplugin:ErrorProne -XepDisableAllChecks -Xep:UnnecessaryLambda:WARN' \ Example.java
This yields the following warning:
If this suggestion were accepted using
-XepPatchChecks:UnnecessaryLambda
the resulting code would not compile, producing a "method reference not expected here" error. Possible solutions:for (int i : (Iterable<Integer>) this::someIterable) {
instead).The text was updated successfully, but these errors were encountered: