From da4614e72ce17999afbe54ae32879f27a59d8c5c Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Sat, 27 Aug 2016 18:03:07 -0700 Subject: [PATCH] JCLOUDS-1160: Upgrade to Gson 2.7 Changelog: https://github.com/google/gson/blob/master/CHANGELOG.md --- core/pom.xml | 2 +- ...rializationConstructorAndReflectiveTypeAdapterFactory.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index ff5895fc96..96fe420d7b 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -80,7 +80,7 @@ com.google.code.gson gson - 2.3.1 + 2.7 com.google.guava diff --git a/core/src/main/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactory.java b/core/src/main/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactory.java index 852a1a1972..603a436015 100644 --- a/core/src/main/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactory.java +++ b/core/src/main/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactory.java @@ -41,6 +41,7 @@ import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; import com.google.gson.internal.ConstructorConstructor; import com.google.gson.internal.Excluder; +import com.google.gson.internal.bind.JsonAdapterAnnotationTypeAdapterFactory; import com.google.gson.internal.bind.ReflectiveTypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; @@ -114,7 +115,8 @@ public final class DeserializationConstructorAndReflectiveTypeAdapterFactory imp this.constructorFieldNamingPolicy = checkNotNull(deserializationFieldNamingPolicy, "deserializationFieldNamingPolicy"); this.delegateFactory = new ReflectiveTypeAdapterFactory(constructorConstructor, checkNotNull( - serializationFieldNamingPolicy, "fieldNamingPolicy"), checkNotNull(excluder, "excluder")); + serializationFieldNamingPolicy, "fieldNamingPolicy"), checkNotNull(excluder, "excluder"), + new JsonAdapterAnnotationTypeAdapterFactory(constructorConstructor)); } public TypeAdapter create(Gson gson, TypeToken type) {