Skip to content

Commit

Permalink
Avoid null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
darcato committed Sep 27, 2024
1 parent 64482e0 commit 780730a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ public boolean isValid(CertificateDTO value, ConstraintValidatorContext context)
boolean valid = true;
try {
if (value == null) {
valid = false;
String message = "Certificate cannot be null.";
context.buildConstraintViolationWithTemplate(message).addConstraintViolation();
return false;
}
if (missingPemAndDn(value)) {
valid = false;
Expand Down

0 comments on commit 780730a

Please sign in to comment.