Skip to content

Commit

Permalink
spotbugs issues + linting
Browse files Browse the repository at this point in the history
  • Loading branch information
artoonie committed Oct 23, 2023
1 parent 3ed3d38 commit 7d398c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ public static boolean isIsHartSignatureValidationEnabled() {
return IS_HART_SIGNATURE_VALIDATION_ENABLED;
}

public static RsaKeyValue getRsaPublicKey() {
public static synchronized RsaKeyValue getRsaPublicKey() {
// Synchronized to prevent a race condition. SpotBugs will complain otherwise, even though
// this is not currently called on multiple threads.
if (rsaKeyValue != null) {
return rsaKeyValue;
}

rsaKeyValue = new RsaKeyValue();
rsaKeyValue.modulus = RSA_MODULUS;
rsaKeyValue.exponent = RSA_EXPONENT;

return rsaKeyValue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static class SignedInfo {
Reference reference;

// Required to match Hart's implementation of canonicalization
@SuppressWarnings("unused")
@SuppressWarnings("URF_Unread_Field")
@JacksonXmlProperty(localName = "xmlns", isAttribute = true)
String xmlns = "http://www.w3.org/2000/09/xmldsig#";
}
Expand Down

0 comments on commit 7d398c7

Please sign in to comment.