JCLOUDS-1160: Upgrade to Gson 2.7

Changelog:

https://github.com/google/gson/blob/master/CHANGELOG.md
This commit is contained in:
Andrew Gaul 2016-08-27 18:03:07 -07:00
parent 15ea6929a2
commit da4614e72c
2 changed files with 4 additions and 2 deletions

View File

@ -80,7 +80,7 @@
<dependency> <dependency>
<groupId>com.google.code.gson</groupId> <groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId> <artifactId>gson</artifactId>
<version>2.3.1</version> <version>2.7</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>

View File

@ -41,6 +41,7 @@ import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory; import com.google.gson.TypeAdapterFactory;
import com.google.gson.internal.ConstructorConstructor; import com.google.gson.internal.ConstructorConstructor;
import com.google.gson.internal.Excluder; import com.google.gson.internal.Excluder;
import com.google.gson.internal.bind.JsonAdapterAnnotationTypeAdapterFactory;
import com.google.gson.internal.bind.ReflectiveTypeAdapterFactory; import com.google.gson.internal.bind.ReflectiveTypeAdapterFactory;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonReader;
@ -114,7 +115,8 @@ public final class DeserializationConstructorAndReflectiveTypeAdapterFactory imp
this.constructorFieldNamingPolicy = checkNotNull(deserializationFieldNamingPolicy, this.constructorFieldNamingPolicy = checkNotNull(deserializationFieldNamingPolicy,
"deserializationFieldNamingPolicy"); "deserializationFieldNamingPolicy");
this.delegateFactory = new ReflectiveTypeAdapterFactory(constructorConstructor, checkNotNull( this.delegateFactory = new ReflectiveTypeAdapterFactory(constructorConstructor, checkNotNull(
serializationFieldNamingPolicy, "fieldNamingPolicy"), checkNotNull(excluder, "excluder")); serializationFieldNamingPolicy, "fieldNamingPolicy"), checkNotNull(excluder, "excluder"),
new JsonAdapterAnnotationTypeAdapterFactory(constructorConstructor));
} }
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {