- for (Object instance : instances) {
- INeutronLoadBalancerAware service = (INeutronLoadBalancerAware) instance;
- int status = service.canUpdateNeutronLoadBalancer(delta, original);
- if (status < 200 || status > 299) {
- return Response.status(status).build();
+ if (instances.length > 0) {
+ for (Object instance : instances) {
+ INeutronLoadBalancerAware service = (INeutronLoadBalancerAware) instance;
+ int status = service.canUpdateNeutronLoadBalancer(delta, original);
+ if (status < 200 || status > 299) {
+ return Response.status(status).build();
+ }