Skip to content

Commit

Permalink
fix: avoid NPE in credential resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed May 21, 2024
1 parent dda7f83 commit d339104
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ private boolean filterInvalidCredentials(VerifiableCredentialResource verifiable
monitor.warning("Credential '%s' is expired.".formatted(credential.getId()));
return false;
}
var revocationResult = credential.getCredentialStatus().isEmpty() ? Result.success() : revocationService.checkValidity(credential);
var credentialStatus = credential.getCredentialStatus();
var revocationResult = (credentialStatus == null || credentialStatus.isEmpty()) ? Result.success() : revocationService.checkValidity(credential);
if (revocationResult.failed()) {
monitor.warning("Credential '%s' not valid: %s".formatted(credential.getId(), revocationResult.getFailureDetail()));
return false;
Expand Down

0 comments on commit d339104

Please sign in to comment.