Skip to content
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

[BUG] Compilation Failure When Using Builder.Default With Validation Annotations #3276

Open
simon-codeinventor opened this issue Oct 7, 2022 · 1 comment

Comments

@simon-codeinventor
Copy link

Using either Java 15 or 17 with Lombok 1.18.24, spring-boot-starter-validation 2.4.9, jakarta-validation-api 2.0.2, and hibernate-validator 6.1.7.Final, this compiles:

@javax.validation.constraints.NotNull @javax.validation.constraints.Size(min = 1) @lombok.NonNull java.util.List<@javax.validation.constraints.NotNull @javax.validation.constraints.NotBlank String> list;

whereas if a Builder.Default is added, compilation fails:

@javax.validation.constraints.NotNull @javax.validation.constraints.Size(min = 1) @lombok.NonNull @lombok.Builder.Default java.util.List<@javax.validation.constraints.NotNull @javax.validation.constraints.NotBlank String> list = java.util.List.of();

@marc-guenther
Copy link

Can you please add a title to this bug report?

@simon-codeinventor simon-codeinventor changed the title [BUG] [BUG] Compilation Failure When Using Builder.Default With Validation Annotations Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants