-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
1.16.22 - constructor ... already defined in class #1703
Comments
See the changelog - was hit by this as well:
Anyhow, I wonder why this isn't reflected in the release changelog that this breaks with And because the new feature adds a private no-args constructor I wonder how we can change the visibility modifier of the constructor? Shouldn't the one coming from @NoArgsConstructor have precedence over the one from |
I'd bet, this is a bug. The only sensible behavior is the explicit annotation taking precedence, i.e.,
IMHO, these two rules make sense:
In this case both rules agree that there should be a |
I somehow hope this is a bug. This being intended would be "suboptimal" ;)
We basically agree what we would expect in terms of precedence. 👍 |
Sidenote: When I see somebody using |
Came in this morning to the same error. We use AllArgs and NoArgs in most of our POJOs. Things are borked now :( |
Yes, this is a bug. Sorry. Will see how soon we can make a new release. |
Putting the @NoArgsConstructor
@Data
public class Foo {
} |
changed the order of the Lombok-Annotations due to projectlombok/lombok#1703
Btw, if there're class inheritance, none of |
On 1.16.22 the following class
refuses to compile with
constructor Test() already defined in class
. Works as expected in 1.16.20.The text was updated successfully, but these errors were encountered: