We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am using
I can reproduce the issue with this testcase:
@Test void methodReferenceForLocalRecord() { rewriteRun( spec -> spec.recipe(new ReplaceLambdaWithMethodReference()), java( """ package com.helloworld; import java.util.stream.Stream; public class Main { public Stream<String> get() { record R(String s) {} return Stream.of(new R("hello world")) .map(r -> r.s()); } }""", """ package com.helloworld; import java.util.stream.Stream; public class Main { public Stream<String> get() { record R(String s) {} return Stream.of(new R("hello world")) .map(R::s); } }""")); }
For the method reference to point to the record name, like R::...
R::...
The method reference starts with a number, like 1R::.... Possibly because the record is defined inline in the method?
1R::...
Sorry, I don't have any spare hack time at the moment.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What version of OpenRewrite are you using?
I am using
What is the smallest, simplest way to reproduce the problem?
I can reproduce the issue with this testcase:
What did you expect to see?
For the method reference to point to the record name, like
R::...
What did you see instead?
The method reference starts with a number, like
1R::...
. Possibly because the record is defined inline in the method?Are you interested in contributing a fix to OpenRewrite?
Sorry, I don't have any spare hack time at the moment.
The text was updated successfully, but these errors were encountered: