Skip to content

Commit

Permalink
refactor(ELY-2597): merge if statements in verifyCertificate method
Browse files Browse the repository at this point in the history
This merges an if statement with it's enclosing if statement to increase readability.

This closes ticket https://issues.redhat.com/browse/ELY-2597
  • Loading branch information
abhishek-nigam committed Oct 6, 2023
1 parent 5f8dd0f commit 42ca09c
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,8 @@ public boolean verifyCertificate(X509Certificate certificate, Attributes attribu

for (int i = 0; i < size; i++) {
Object attrDigest = attribute.get(i);
if (attrDigest != null){
if (digest.equalsIgnoreCase((String) attrDigest)) {
return true;
}
if (attrDigest != null && digest.equalsIgnoreCase((String) attrDigest)){
return true;
}
}
} catch (NoSuchAlgorithmException | CertificateEncodingException e) {
Expand Down

0 comments on commit 42ca09c

Please sign in to comment.