JCLOUDS-750 Remove need for custom json type adapters on OAuth.

This commit is contained in:
Adrian Cole 2014-11-01 12:31:04 -07:00 committed by Adrian Cole
parent 0d9307874d
commit 7e6bf07de1
1 changed files with 0 additions and 7 deletions

View File

@ -18,20 +18,17 @@ package org.jclouds.googlecloudstorage.config;
import java.lang.reflect.Type;
import java.util.Map;
import java.util.Set;
import javax.inject.Singleton;
import org.jclouds.googlecloudstorage.domain.templates.BucketTemplate;
import org.jclouds.json.config.GsonModule;
import org.jclouds.oauth.v2.config.OAuthParserModule;
import com.google.common.collect.ImmutableMap;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import com.google.gson.TypeAdapterFactory;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
@ -41,10 +38,6 @@ public class GoogleCloudStorageParserModule extends AbstractModule {
bind(GsonModule.DateAdapter.class).to(GsonModule.Iso8601DateAdapter.class);
}
@Provides @Singleton public Set<TypeAdapterFactory> typeAdapterFactories() {
return new OAuthParserModule().typeAdapterFactories();
}
@Provides @Singleton public Map<Type, Object> typeAdapters() {
return new ImmutableMap.Builder<Type, Object>()
.put(BucketTemplate.class, new BucketTemplateTypeAdapter())