Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [lombok]

Project Lombok is a tool for reducing boilerplate code in Java through annotations and compile time code generation.

lombok
0 votes
0 answers
17 views

cannot access class com.sun.tools.javac.api.JavacTrees (in module jdk.compiler)

I have customized an annotation handler using java21. The pom file of the project where the annotation processor is located is shown below: <project xmlns="http://maven.apache.org/POM/4.0.0&...
Photon's user avatar
  • 11
2 votes
0 answers
26 views

Gradle does not see log field through @Log4j2 annotation inside lombok in InteliJ

I have a class @Log4j2 public class TestClass { public void doSmth() { log.info("doSmth"); } } When I try to compile my code using gradle (tap on "assemble" button ...
Oblivion's user avatar
0 votes
1 answer
18 views

Lombok 1.18.12 is not generating getter and setter in Eclipse 4.31.0

I have same issue as here but none of the solutions works for me in Eclipse 2024-03 (4.31.0) and Lombok 1.18.12. I have dependency: <project...> <dependencies> <dependency> ...
user1182625's user avatar
0 votes
0 answers
26 views

Guice injecting empty string instead of value from @Provides method [duplicate]

I have the following class which is using Lombok-generated constructor injection: @RequiredArgsConstructor(onConstructor = @__(@Inject)) public class S3ModelAuditor implements ModelAuditor { ...
akerra's user avatar
  • 1,132
0 votes
1 answer
11 views

@InitBinder setDisallowedFields not working

In a Spring rest controller (using Spring Boot 3.3.1), I have a POST mapping method that populates a DTO like this : @RestController public class SomeController { @InitBinder("NoId") ...
McQuack's user avatar
  • 413
-1 votes
1 answer
38 views

Use Spring or other to avoid lasagna (layered) code

Imagine the following classes public abstract class BasePage { // Common functionality for all pages } public class LoginPage extends BasePage { public void login(String username, String ...
Paulo Oliveira's user avatar
0 votes
0 answers
29 views

Jakarta @Nullable Annotation Not Propagating to Lombok-Generated Setter Method [duplicate]

I'm encountering an issue where the Jakarta `@Nullable` annotation is not being propagated to the setter method generated by Lombok's `@Data` annotation. However, when I use the `@Nullable` annotation ...
user25339347's user avatar
3 votes
1 answer
51 views

Multiple constructors annotated with Lombok @Builder cause a problem?

This is my first question, so please feel free to correct anything that I missed writing this question:) I am having trouble with using the @Bulider with my DTO objects. I have an abstract class "...
Doh Kun Lee sanity's user avatar
-2 votes
2 answers
71 views

Deserialization error on the 3rd library class instance in the class (using Lombok annotations) [duplicate]

I want to use a 3rd party (external) class instance in a class but I am getting this error on deserialization: Cannot construct instance of org.springframework.data.geo.Point (no Creators, like ...
Eric's user avatar
  • 449
1 vote
1 answer
69 views

How do I capitalize the field name of lombok setter & getter?

I have a field I want getters & setters for. The problem is that the field should be capitalized if it is occuring after the position in any field or method. ex: What I get private final String ...
sampath.xyz's user avatar
-1 votes
1 answer
45 views

getSomeColumn is not a method even using lombok [closed]

Below is my database entity package org.example.api.entidades; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; import lombok.Getter; import lombok....
Davi Américo's user avatar
1 vote
0 answers
13 views

Duplicate Hibernate validation ConstraintViolations on Lomboks @Data bean

I have a Lombok bean: @Data public class Foo { @NotBlank @Schema(description = "Organization label") @Pattern(regexp = "^[-a-zA-Z0-9]+(\\.[-a-zA-Z0-9]+)?$", message = &...
igr's user avatar
  • 10.5k
0 votes
1 answer
86 views

Eclipse version 24-6 isn't working with the lombok plugin

I used the lombok.jar installer for eclipse, it modified my eclipse.ini file -startup plugins/org.eclipse.equinox.launcher_1.6.800.v20240513-1750.jar --launcher.library plugins/org.eclipse.equinox....
WendyG's user avatar
  • 588
-1 votes
2 answers
65 views

Lombok builder() method returning null in Spring Boot application

I'm working on a Spring Boot application using JPA and Lombok. I have an Author entity with Lombok annotations. However, when I try to use the builder() method to create an Author object, IntelliJ ...
Sri Murugan's user avatar
0 votes
2 answers
84 views

java.lang.NoSuchMethodError: 'void org.eclipse.jdt.internal.compiler.ast.CaseStatement.<init>...'

In my Java 21 application with Lombok 1.18.32 one of the classes uses @Builder with @Singular, something like this: @Builder public class Naughty { private final @Singular("option") List&...
Jan Nielsen's user avatar
  • 11.4k

15 30 50 per page
1
2 3 4 5
166