[Lombok] Constructor can have only non-static fields
When using the AllArgsConstructor annotation (directly or via meta-annotation), only fields that are not static should be added as arguments. Previously, all fields were being included regardless of static-ness, which is not consistent with the behavior of Lombok. ^KT-54025 Fixed
This commit is contained in:
@@ -27,6 +27,9 @@ public class ConstructorExample {
|
||||
|
||||
@NonNull Integer somethingElse;
|
||||
|
||||
// Not required by annotation because static.
|
||||
private static String constant;
|
||||
|
||||
static void javaUsage() {
|
||||
ConstructorExample generated = ConstructorExample.build("foo", true, 12);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user