-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Code with @Builder annotation fails to compile in Java 9 (works in Java 8) #1807
Comments
I have no idea what causes this problem. I can reproduce it. My suggestion is to modify your code and assign the formatter to a local variable (or a static final field). That takes care of this instance of the problem. I'm closing this issue, even though there is an underlying unknown bug. Based on our experience chasing similar bugs, this can take weeks to find, and it not a common use case. |
I had similar issue, when using @JsonCreator and @JsonProperty on constructor along with @builder annotation,
|
Can confirm @blackuprise 's way to reproduce it and the workaround. |
it works! Thanks! <3 |
Using Lombok 1.18.2. The following class compiles with Java 8 but not with Java 9:
The following is the error output:
If the
DateTimeFormatter.ofPattern("yyyyMMdd")
line is changed toDateTimeFormatter.BASIC_ISO_DATE
, then the code compiles fine (even though both methods return the same type).I'm attaching a minimal gradle project that compiles just this file. Use
gradle build
to see the error.lombok-test.zip
The text was updated successfully, but these errors were encountered: