-
-
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
@Data on extended objects broken on 1.16.22 #1712
Comments
@Data
@AllArgsConstructor
public abstract class ResidenceOwner {
String name;
}
@Data
@EqualsAndHashCode(callSuper = true)
public class UserResidenceOwner extends ResidenceOwner {
private final long userId;
public UserResidenceOwner(long userId, String name) {
super(name);
this.userId = userId;
}
public EmpireUser getUser() {
return EmpireUser.getUser(userId);
}
} |
Related to #1708 |
As a workaround for now, you can also put a @NoArgsConstructor
@Data
public class Foo {
} In case you want it not to generate a constructor at all, you can use the @NoArgsConstructor(access = AccessLevel.NONE)
@Data
public class Foo {
} |
Yeah, we probably shouldn't add the no-args constructor for classes that extend something. |
jdk8
1.16.16 and 1.16.20 compiled this code just fine
1.16.22 is broken
This worked in 1.16.16, updating to 1.12 breaks with:
[ERROR] /path/Test2.java:[13,1] Test1() has private access in Test1
Also having issues with
This all worked before, and i can't figure out how to fix it.
These are all classes that inherit other data classes.
The text was updated successfully, but these errors were encountered: