Skip to content
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

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft

Conversation

amishra-u
Copy link
Contributor

What's changed?

Added lombok support for java-11

What's your motivation?

Enable type attribution for lombok generated methods for java 11.

Checklist

  • I've added unit tests to cover both positive and negative cases
    Lombok test already exist for java 17, enabled those test for java 11
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@timtebeek
Copy link
Contributor

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.

@timtebeek timtebeek marked this pull request as draft December 23, 2024 17:28
vudayani and others added 21 commits December 27, 2024 17:05
* 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
* 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)
)

* Add a `isClassAvailable` method to the ReflectionUtils

* Add a `isClassAvailable` method to the ReflectionUtils

* Add a `isClassAvailable` method to the ReflectionUtils
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

8 participants