> @@ -231,11 +237,11 @@ public static Volume forId(String volumeId) {
>     @Named("display_description")
>     private final String description;
>     private final Map<String, String> metadata;

It is unnecessary. If the field name is the same, then it's fine as-is.

The obscure reflection thing happens when there is no `@ConstructorProperties` 
annotation. The class does not have a default constructor, but a constructor 
that accepts "some" fields, and there is no hint about which parameter 
corresponds to each field in the JSON object. In that case, if the object is 
immutable (fields are final and there are no setters), Gson uses the 
`sun.misc.Unsafe` class to directly populate the values to the fields, based on 
their name.

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

Reply via email to