> + 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);
> But it's worth an issue if we feel this is not the right behavior.
I think the behaviour is OK, especially if that's the way it was. It's more a
question of whether this is a Big Problem the consumer needs to know about, or
whether this is something the user shouldn't have to care about,, only a
developer interested in debugging might want to see.
I.e. is this a minor parsing problem or a Big Error Condition?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/362/files#r13058419