> + 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);
Following my comment above, this is a parser that can potentially generate lots
of logs (depending on the number of images available in the provider). I really
don't know if it is a normal thing for the images to have missing fields, and
don't know the number of logs that could be generated by this statement (I
assume there could be lots of them as it was already set to trace). But if you
think it would be better to change it to `warn`, I'll change them.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/362/files#r13038595