Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ public void deleteSslCert(final DeleteSslCertCmd deleteSslCertCmd) {
final List<LoadBalancerCertMapVO> lbCertRule = _lbCertDao.listByCertId(certId);

if (lbCertRule != null && !lbCertRule.isEmpty()) {
String lbUuids = "";
StringBuilder lbNames = new StringBuilder();

for (final LoadBalancerCertMapVO rule : lbCertRule) {
final LoadBalancerVO lb = _entityMgr.findById(LoadBalancerVO.class, rule.getLbId());
lbUuids += " " + lb.getUuid();
lbNames.append(lb.getName()).append(" ");
}

throw new CloudRuntimeException("Certificate in use by a loadbalancer(s)" + lbUuids);
throw new CloudRuntimeException("Certificate in use by a loadbalancer(s) " + lbNames.toString());
}

_sslCertDao.remove(certId);
Expand Down Expand Up @@ -311,9 +311,8 @@ public SslCertResponse createCertResponse(final SslCertVO cert, final List<LoadB
{
response.setProjectId(project.getUuid());
response.setProjectName(project.getName());
} else {
response.setAccountName(account.getAccountName());
}
response.setAccountName(account.getAccountName());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be more efficient to just remove the else block below entirely

} else {
response.setAccountName(account.getAccountName());
}
Expand Down