Skip to content

Commit

Permalink
Change method return types
Browse files Browse the repository at this point in the history
  • Loading branch information
hwupathum committed Jul 30, 2024
1 parent f749b7a commit d1cf6d0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public static X509CredentialImpl getX509CredentialImplForTenant(String tenantDom
} else {
// for super tenant, load the default pub. cert using the
// config. in carbon.xml
cert = keyStoreManager.getCachedPrimaryKeyStore().getCertificate(alias);
cert = (java.security.cert.X509Certificate) keyStoreManager.getCachedPrimaryKeyStore().getCertificate(alias);
}

if (cert == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ private X509Certificate getCertificateFromKeyStore(String alias) {

try {
KeyStoreManager keyStoreManager = KeyStoreManager.getInstance(MultitenantConstants.SUPER_TENANT_ID);
return keyStoreManager.getCachedPrimaryKeyStore().getCertificate(alias);
return (X509Certificate) keyStoreManager.getCachedPrimaryKeyStore().getCertificate(alias);
} catch (Exception e) {
String errorMsg = String.format("Error occurred while retrieving the certificate for " +
"the alias '%s'." + alias);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ public static X509CredentialImpl getX509CredentialImplForTenant(String tenantDom
}
} else { // for super tenant, load the default pub. cert using the
// config. in carbon.xml
cert = keyStoreManager.getCachedPrimaryKeyStore().getCertificate(alias);
cert = (X509Certificate) keyStoreManager.getCachedPrimaryKeyStore().getCertificate(alias);
}
credentialImpl = new X509CredentialImpl(cert);

Expand Down

0 comments on commit d1cf6d0

Please sign in to comment.