> +      if (from.containsKey("size"))
> +         builder.size(Long.valueOf(from.get("size")));
> +      if (from.containsKey("rawsize"))
> +         builder.rawSize(Long.valueOf(from.get("rawsize")));
> +      if (from.containsKey("format"))
> +         builder.format(ImageConversionType.fromValue(from.get("format")));
> +      Map<String, String> metadata = Maps.newLinkedHashMap();
> +      for (Entry<String, String> entry : from.entrySet()) {
> +         if (entry.getKey().startsWith("user:"))
> +            
> metadata.put(entry.getKey().substring(entry.getKey().indexOf(':') + 1), 
> entry.getValue());
> +      }
> +      builder.userMetadata(metadata);
> +      try {
> +         return builder.build();
> +      } catch (NullPointerException e) {
> +         logger.trace("entry missing data: %s; %s", e.getMessage(), from);

As far as I understand the code, missing data here (and the `null` returned in 
that case) will translate in the StandardDrive (the Image) not being returned. 
So I see it as "if some image is missing a field jclouds needs, we're not 
returning them and can't be used in the portable abstraction".

This is how it was working before the change. But it's worth an issue if we 
feel this is not the right behavior.

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

Reply via email to