-
Notifications
You must be signed in to change notification settings - Fork 358
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
Add lombok support for java-11 #4769
Conversation
Thanks for the work done here to create parity between the Java 11 and 17 parsers @amishra-u ! As you've found there's still some issues we need to work out before we're comfortable repeating these patterns across parsers, and enable it by default:
Let's keep an eye on the discussion there and if we find a fix, apply that both for Java 17 and Java 11. |
* Handle erroneous nodes in a tree * Add visitErroneous to all java parser visitors * Override the visitVariable to handle erroneous identifier names set by JavacParser * retain name and suffix for erroneous varDecl * override the visitVariable to handle error identifiers in all java parser visitors * Remove sysout * Update rewrite-java-test/src/test/java/org/openrewrite/java/JavaParserTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update rewrite-java-test/src/test/java/org/openrewrite/java/JavaParserTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * handle errors in method params, variable declarations, fix tests * Add missing license headers * fix compilation error * fix compilation error in Java8ParserVisitor * Apply code suggestions from bot * fix cases for statementDelim * fix block statement template generator to handle adding semicolon * fix ChangeStaticFieldToMethod recipe * Record compiler errors from erroneous LST nodes * Adjustments for comments * Java 17 parser adjustment alos in 8, 11 and 21 * Add `FindCompileErrorsTest` & move away from deprecated `print()` --------- Co-authored-by: Jonathan Schnéider <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tim te Beek <[email protected]> Co-authored-by: aboyko <[email protected]>
) * WIP * Format * Format * Move grabbing of whitespace and resetting cursor to where it is actually required * Extra check is not required * Use toString * Add `emptyListLiteralWithParentheses` test * Add `insideFourParenthesesAndEnters` test * Move list tests all to ListTest * Add `emptyMapLiteralWithParentheses` * Review feedback and fix new testcases * Add `attributeWithParentheses` * Improve AttributeTest * Improve AttributeTest * Improve AttributeTest * Improve AttributeTest * Improve AttributeTest * Review fix new testcases * Revert edit to testcase * Add and fix testcase with newline * Add JavaDoc and move logic regarding whitespace and resetting cursor --------- Co-authored-by: lingenj <[email protected]>
* suppress javax.json * Update suppressions.xml
* Separating and clearer naming * Add license header * Review feedback
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.gradle.UpdateGradleWrapper?organizationId=T3BlblJld3JpdGU%3D#defaults=W3sibmFtZSI6ImFkZElmTWlzc2luZyIsInZhbHVlIjoiRmFsc2UifV0= Co-authored-by: Moderne <[email protected]>
* Add recipe to remove Gradle Enterprise and Develocity * Remove left over java plugin
…#4791) * Allow file scheme in `RemoteArchive` to simplify testing While it might look a bit controversial, the file scheme can also point to a remote (for instance a mounted network share) file. By allowing the `file://` scheme we can use `RemoteArchive` for those files. As a useful side effect, this makes testing RemoteArchive handling a lot easier. * fix test * Update rewrite-core/src/test/java/org/openrewrite/remote/RemoteArchiveTest.java Co-authored-by: Sam Snyder <[email protected]> --------- Co-authored-by: Sam Snyder <[email protected]>
…ssion` when AST doesn't provide `_INSIDE_PARENTHESES_LEVEL` flag (openrewrite#4807)
…s that return exceptions.
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.staticanalysis.CompareEnumsWithEqualityOperator?organizationId=T3BlblJld3JpdGU%3D Co-authored-by: Moderne <[email protected]>
…rite#4814) * Make the same performance improvement to parameter names allocations that we previously made to Java 17/21 in openrewrite#3345.
* Revert "Try alternative way of determining parenthesis level for `BinaryExpression` when AST doesn't provide `_INSIDE_PARENTHESES_LEVEL` flag (openrewrite#4807)" This reverts commit e59e48b. * Revert "Make Groovy Parser correctly handle nested parenthesis (openrewrite#4801)" This reverts commit 91a031a.
…e#4806) * JavaTemplate bug when inserting `final var` into for-each * Split variable declarations when they contain stop comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your help here & over on projectlombok/lombok#3800 @amishra-u!
What's changed?
Added lombok support for java-11
What's your motivation?
Enable type attribution for lombok generated methods for java 11.
Checklist
Lombok test already exist for java 17, enabled those test for java 11