mirror of https://github.com/apache/cloudstack.git
CS-15061: Not able to add account based ingress rules.NullPointerException seen in management server logs.
Reviewed-By: Sheng Yang Adding null check - regression due to CS 14968
This commit is contained in:
parent
686064a8be
commit
83aa7ee125
|
|
@ -205,9 +205,11 @@ public class AuthorizeSecurityGroupIngressCmd extends BaseAsyncCmd {
|
|||
|
||||
@Override
|
||||
public void execute() {
|
||||
for(String cidr : cidrList ){
|
||||
if (!NetUtils.isValidCIDR(cidr)){
|
||||
throw new ServerApiException(BaseCmd.PARAM_ERROR, cidr + " is an Invalid CIDR ");
|
||||
if(cidrList != null){
|
||||
for(String cidr : cidrList ){
|
||||
if (!NetUtils.isValidCIDR(cidr)){
|
||||
throw new ServerApiException(BaseCmd.PARAM_ERROR, cidr + " is an Invalid CIDR ");
|
||||
}
|
||||
}
|
||||
}
|
||||
List<? extends SecurityRule> ingressRules = _securityGroupService.authorizeSecurityGroupIngress(this);
|
||||
|
|
|
|||
Loading…
Reference in New Issue