Errors during build/run when constructor parameters are annotated with @NotNull
or Lombok @NonNull
#29322
Replies: 4 comments
-
Another example:
Using
Is there some pitfall using Another example:
throws
In attached image you can see that extra parameters (interceptors) are added to constructor and are taken in account by validator interceptor. Any advice? |
Beta Was this translation helpful? Give feedback.
-
The issue i experience after updating to the mentioned version of Quarkus is that Quarkus ClassLoader throws an There is no issue on 2.13.4.Final Example occurence on log:
While it seems obvious: Exceptions are NOT thrown at build time, but rather only at startup. |
Beta Was this translation helpful? Give feedback.
-
Please create an issue with a full Maven reproducer. My guess is that Lombok magic is problematic (again). |
Beta Was this translation helpful? Give feedback.
-
@gsmet Ive created the requested reproducer and issue here: #29434 |
Beta Was this translation helpful? Give feedback.
-
After upgrade to 2.14.0.Final (2.14.1.Final does not solve the problem) every bean using
@RequiredArgsConstructor
with@lombok.NonNull
on mandatory property will broke the build(delombok code)
Lombok is scoped as
provided
as suggested and compiler-plugin is configured to process annotations as described in lombok and mapstructs guidesafter update
quarkus-maven-plugin
withbuild will complete successfully but running application will result in
After Quarkus upgrade, seems that lombok is required as runtime dependency but before all works flawless.
Is there an official guide on Lombok/MapStruct integration with Quarkus?
Am I doing something wrong?
Windows 11
java version "17.0.4.1" 2022-08-18 LTS
Java(TM) SE Runtime Environment (build 17.0.4.1+1-LTS-2)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.4.1+1-LTS-2, mixed mode, sharing)
PS: Changing lombok dependency from
provided
tocompile
will solve the problem, but I'm not sure is right way to solve the problem.Best regards
Luca
Beta Was this translation helpful? Give feedback.
All reactions