> @@ -122,7 +122,16 @@ public ServerWithSecurityGroups deserialize(JsonElement
> jsonElement, Type type,
> @Override
> public Server deserialize(JsonElement jsonElement, Type type,
> JsonDeserializationContext context)
> throws JsonParseException {
> - Server serverBase = apply((ServerInternal)
> context.deserialize(jsonElement, ServerInternal.class));
> + Server serverBase = null;
> +
> + // Servers can be created without an image so test if an image
> object is returned
> + if (jsonElement.getAsJsonObject().get("image").isJsonObject()) {
> + serverBase = apply((ServerInternal)
> context.deserialize(jsonElement, ServerInternal.class));
> + }
> + else {
[minor[ `} else {` on one line?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/414/files#r14120826