Upgrade to gson 2.2.4
https://issues.apache.org/jira/browse/JCLOUDS-117


Project: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/commit/1178f47c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/tree/1178f47c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/diff/1178f47c

Branch: refs/heads/master
Commit: 1178f47cd7d829c1fd6bedc0f4e13d8073846594
Parents: 98230e6
Author: Zack Shoylev <[email protected]>
Authored: Tue Jun 25 16:46:40 2013 -0500
Committer: Andrew Gaul <[email protected]>
Committed: Thu Jul 11 13:52:32 2013 -0700

----------------------------------------------------------------------
 core/pom.xml                                                    | 2 +-
 core/src/main/java/org/jclouds/json/config/GsonModule.java      | 3 ++-
 ...alizationConstructorAndReflectiveTypeAdapterFactoryTest.java | 5 ++++-
 3 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/1178f47c/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 44a9404..cea171c 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -85,7 +85,7 @@
     <dependency>
       <groupId>com.google.code.gson</groupId>
       <artifactId>gson</artifactId>
-      <version>2.2.2</version>
+      <version>2.2.4</version>
     </dependency>
     <dependency>
       <groupId>com.google.guava</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/1178f47c/core/src/main/java/org/jclouds/json/config/GsonModule.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/jclouds/json/config/GsonModule.java 
b/core/src/main/java/org/jclouds/json/config/GsonModule.java
index 3d2e0bf..4be2fd6 100644
--- a/core/src/main/java/org/jclouds/json/config/GsonModule.java
+++ b/core/src/main/java/org/jclouds/json/config/GsonModule.java
@@ -65,6 +65,7 @@ import com.google.gson.FieldAttributes;
 import com.google.gson.FieldNamingStrategy;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
+import com.google.gson.InstanceCreator;
 import com.google.gson.TypeAdapter;
 import com.google.gson.TypeAdapterFactory;
 import com.google.gson.internal.ConstructorConstructor;
@@ -123,7 +124,7 @@ public class GsonModule extends AbstractModule {
             ImmutableSet.of(ConstructorProperties.class, Inject.class), 
ImmutableSet.of(new ExtractNamed()));
 
       builder.registerTypeAdapterFactory(new 
DeserializationConstructorAndReflectiveTypeAdapterFactory(
-            new ConstructorConstructor(), serializationPolicy, 
Excluder.DEFAULT, deserializationPolicy));
+            new ConstructorConstructor(ImmutableMap.<Type, 
InstanceCreator<?>>of()), serializationPolicy, Excluder.DEFAULT, 
deserializationPolicy));
 
       // complicated (serializers/deserializers as they need context to 
operate)
       builder.registerTypeHierarchyAdapter(Enum.class, new 
EnumTypeAdapterThatReturnsFromValue());

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/1178f47c/core/src/test/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactoryTest.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactoryTest.java
 
b/core/src/test/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactoryTest.java
index 004196b..0c57cef 100644
--- 
a/core/src/test/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactoryTest.java
+++ 
b/core/src/test/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactoryTest.java
@@ -23,6 +23,7 @@ import static org.testng.Assert.assertNull;
 
 import java.beans.ConstructorProperties;
 import java.io.IOException;
+import java.lang.reflect.Type;
 import java.util.List;
 import java.util.Map;
 
@@ -36,12 +37,14 @@ import org.testng.annotations.Test;
 
 import com.google.common.base.Objects;
 import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.gson.FieldNamingStrategy;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
+import com.google.gson.InstanceCreator;
 import com.google.gson.TypeAdapter;
 import com.google.gson.internal.ConstructorConstructor;
 import com.google.gson.internal.Excluder;
@@ -65,7 +68,7 @@ public final class 
DeserializationConstructorAndReflectiveTypeAdapterFactoryTest
       NamingStrategies.AnnotationConstructorNamingStrategy 
deserializationPolicy = new 
NamingStrategies.AnnotationConstructorNamingStrategy(
             ImmutableSet.of(ConstructorProperties.class, Inject.class), 
ImmutableSet.of(new ExtractNamed()));
 
-      return new DeserializationConstructorAndReflectiveTypeAdapterFactory(new 
ConstructorConstructor(),
+      return new DeserializationConstructorAndReflectiveTypeAdapterFactory(new 
ConstructorConstructor(ImmutableMap.<Type, InstanceCreator<?>>of()),
             serializationPolicy, Excluder.DEFAULT, deserializationPolicy);
    }
 

Reply via email to