> +                 .getOperatingSystemReferenceCode(), 
> "operatingSystemReferenceCode");
> +         templateObject = new TemplateObject(hostname, domain, startCpus, 
> maxMemory, true,
> +                 operatingSystemReferenceCode, null, localDiskFlag, new 
> Datacenter(datacenterName), networkComponents,
> +                 getBlockDevices(virtualGuest));
> +      } else if(virtualGuest.getVirtualGuestBlockDeviceTemplateGroup() != 
> null) {
> +         String globalIdentifier = 
> checkNotNull(virtualGuest.getVirtualGuestBlockDeviceTemplateGroup()
> +                 .getGlobalIdentifier(), 
> "blockDeviceTemplateGroup.globalIdentifier");
> +         templateObject = new TemplateObject(hostname, domain, startCpus, 
> maxMemory, true, null,
> +                 new BlockDeviceTemplateGroup(globalIdentifier), 
> localDiskFlag, new Datacenter(datacenterName),
> +                 networkComponents, null);
> +      }
> +      return json.toJson(ImmutableMap.of("parameters", 
> ImmutableList.of(templateObject)));
> +   }
> +
> +   private Set<BlockDevice> getBlockDevices(VirtualGuest virtualGuest) {
> +      if (virtualGuest.getVirtualGuestBlockDevices() == null) return null;

[minor] Write as
```
if (virtualGuest.getVirtualGuestBlockDevices() == null) {
  return null;
}
```

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

Reply via email to