Skip to content

Commit 7042cfb

Browse files
committed
Apply suggestions from code review
1 parent d7cf413 commit 7042cfb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/main/java/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ public boolean deleteCustomerGateway(DeleteVpnCustomerGatewayCmd cmd) {
415415
protected boolean doDeleteCustomerGateway(Site2SiteCustomerGateway gw) {
416416
long id = gw.getId();
417417
List<Site2SiteVpnConnectionVO> vpnConnections = _vpnConnectionDao.listByCustomerGatewayId(id);
418-
if (CollectionUtils.isEmpty(vpnConnections)) {
418+
if (!CollectionUtils.isEmpty(vpnConnections)) {
419419
throw new InvalidParameterValueException("Unable to delete VPN customer gateway with id " + id + " because there is still related VPN connections!");
420420
}
421421
annotationDao.removeByEntityType(AnnotationService.EntityType.VPN_CUSTOMER_GATEWAY.name(), gw.getUuid());
@@ -425,7 +425,7 @@ protected boolean doDeleteCustomerGateway(Site2SiteCustomerGateway gw) {
425425

426426
protected void doDeleteVpnGateway(Site2SiteVpnGateway gw) {
427427
List<Site2SiteVpnConnectionVO> conns = _vpnConnectionDao.listByVpnGatewayId(gw.getId());
428-
if (CollectionUtils.isEmpty(conns)) {
428+
if (!CollectionUtils.isEmpty(conns)) {
429429
throw new InvalidParameterValueException("Unable to delete VPN gateway " + gw.getId() + " because there is still related VPN connections!");
430430
}
431431
_vpnGatewayDao.remove(gw.getId());

0 commit comments

Comments
 (0)