> +      String groupId = zoneAndId.getId();
> +
> +      Optional<? extends SecurityGroupApi> sgApi = 
> client.getSecurityGroupExtensionForZone(zone);
> +
> +      if (!sgApi.isPresent()) {
> +         return false;
> +      }
> +
> +      if (sgApi.get().get(groupId) != null) {
> +         sgApi.get().delete(groupId);
> +         // TODO: test this clear happens
> +         groupCreator.invalidate(new ZoneSecurityGroupNameAndPorts(zone, 
> groupId, ImmutableSet.<Integer> of()));
> +         return true;
> +      }
> +
> +      return false;

Use same pattern as above?
```
if (... == null) {
  // do null case
}
// do non-null case
```
?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/144/files#r6344668

Reply via email to