这是indexloc提供的服务,不要输入任何密码
Skip to content

Lombok should delete @Singlular annotation from a field when a constructor is annotated with @Builder. #1377

@ajagtian

Description

@ajagtian

Example

@Accessors(fluent = true)
@AllArgsConstructor(access = PACKAGE)
@FieldDefaults(makeFinal = true, level = PRIVATE)
public class Book {
    @NonNull
    @Getter
    String name;
    @Getter
    @NonNull
    @Singular
    Set<Author> authors;
    int numberOfAuthors;
  
   @Builder
   public Book(String name, @Singular Set<Author> authors) {
       this(name, authors, authors.size());
   }
}

This does not fail during compile time or delomboking, but fails at javadoc generation because Lombok does not detect and delete @Singular from the field authors

Metadata

Metadata

Assignees

Labels

acceptedThe issue/enhancement is valid, sensible, and explained in sufficient detailbug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions