Describe the bug
Using the combination of @Data, @Builder,@NoArgsConstructor, and @AllArgsConstructor throws the error that -
constructor Person() is already defined in class com.example.Person
To Reproduce
Generate a Maven project with Java SDK 21. Add Lombok 1.18.32 as the sole dependency in the pom.xml.
Create a simple POJO class called Person with some fields - name, age, gender, and country.
Annotate the class with the four annotations to generate the getters, setters, builder pattern methods, no-argument constructor and all-arguments constructor.
Build the project with the command - mvn clean install.
Expected behavior
The Maven project expects to be built successfully. This error seems to be related to version specific as the lower version (1.18.30 and below) worked as expected.
Version info (please complete the following information):
Lombok version - 1.18.32
Platform (javac or eclipse, and if so, what is the output of javac -version / the version listed in the about... dialog of eclipse.
Output for javac -version
java version "21.0.3" 2024-04-16 LTS
Java(TM) SE Runtime Environment (build 21.0.3+7-LTS-152)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.3+7-LTS-152, mixed mode, sharing)
Output of About IntelliJ
IntelliJ IDEA 2024.1.4 (Community Edition)
Build #IC-241.18034.62, built on June 20, 2024
Runtime version: 17.0.11+1-b1207.24 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4046M
Cores: 18
Registry:
ide.experimental.ui=true
Non-Bundled Plugins:
Docker (241.18034.82)
Lombook Plugin (241.18034.62)
org.intellij.scala (2024.1.24)
Kotlin: 241.18034.62-IJ
Describe the bug Using the combination of
@Data
,@Builder
,@NoArgsConstructor
, and@AllArgsConstructor
throws the error that - constructorPerson()
is already defined in classcom.example.Person
To Reproduce
Java SDK 21
. AddLombok 1.18.32
as the sole dependency in thepom.xml
.Person
with some fields -name, age, gender, and country
.mvn clean install
.Expected behavior The Maven project expects to be built successfully. This error seems to be related to version specific as the lower version (1.18.30 and below) worked as expected.
Version info (please complete the following information):
1.18.32
javac -version
/ the version listed in the about... dialog of eclipse. Output forjavac -version
Output of About IntelliJ