> +      }
> +
> +      /**
> +       * Used from jclouds builtin deserializer.
> +       */
> +      public static Type fromValue(String type) {
> +          if (type != null) {
> +             for (Type value : Type.values()) {
> +                if (type.equals(value.type)) {
> +                   return value;
> +                }
> +             }
> +             return UNRECOGNIZED;
> +          }
> +          return null;
> +      }

- According to the documentation here: 
http://developer.openstack.org/api-ref-compute-v2-ext.html, it's not clarified 
if `type` cannot be null, actually the response is not documented at all, 
besides providing an example. Now according to the openstack source code, this 
field always gets a valid value.

- In the implementation you provide, you use the enum valueOf(), which cannot 
be overriden, in order to map the values in the constructors with the enum 
values.


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

Reply via email to