If the annotation is not present, don't do anything
(1864)
@@ -50,8 +50,10 @@ public class NotNullAnnotationPlugin implements ModelPropertyBuilderPlugin {
@Override
public void apply(ModelPropertyContext context) {
Optional<NotNull> notNull = extractAnnotation(context);
+ if (notNull.isPresent()) {
context.getBuilder().required(notNull.isPresent());
}
+ }
@VisibleForTesting
Optional<NotNull> extractAnnotation(ModelPropertyContext context) {
