> + builder.readers(Splitter.on(' ').split(from.get("readers")));
> + 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) {
Urgh! Can't we check during the parsing whether all the data is available? Or
do we feel this is an easier way?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/362/files#r13033952