Skip to content

Commit 40cc6f1

Browse files
committed
Remove redundant network assert statements
1 parent 821949c commit 40cc6f1

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

server/src/main/java/com/cloud/network/NetworkServiceImpl.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,8 +1025,6 @@ public Network createGuestNetwork(CreateNetworkCmd cmd) throws InsufficientCapac
10251025
boolean bypassVlanOverlapCheck = false;
10261026
if (cmd instanceof CreateNetworkCmdByAdmin) {
10271027
vlanId = ((CreateNetworkCmdByAdmin)cmd).getVlan();
1028-
}
1029-
if (cmd instanceof CreateNetworkCmdByAdmin) {
10301028
bypassVlanOverlapCheck = ((CreateNetworkCmdByAdmin)cmd).getBypassVlanOverlapCheck();
10311029
}
10321030

@@ -1824,11 +1822,10 @@ public boolean deleteNetwork(long networkId, boolean forced) {
18241822

18251823
// don't allow to delete system network
18261824
if (isNetworkSystem(network)) {
1827-
assert network != null;
1825+
18281826
throwInvalidIdException("Network with specified id is system and can't be removed", network.getUuid(), "networkId");
18291827
}
18301828

1831-
assert network != null;
18321829
Account owner = _accountMgr.getAccount(network.getAccountId());
18331830

18341831
// Only Admin can delete Shared

0 commit comments

Comments
 (0)