removed unused code.

This commit is contained in:
Inderjeet Singh 2008-11-14 02:43:32 +00:00
parent 6fa09b5ef6
commit e4ea6b1fd0
2 changed files with 0 additions and 9 deletions

View File

@ -18,7 +18,6 @@ package com.google.gson;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.Collection;
/** /**
* A visitor that populates fields of an object with data from its equivalent * A visitor that populates fields of an object with data from its equivalent

View File

@ -19,8 +19,6 @@ package com.google.gson;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.Collection;
import java.util.Map;
/** /**
* A visitor that adds JSON elements corresponding to each field of an object * A visitor that adds JSON elements corresponding to each field of an object
@ -160,12 +158,6 @@ final class JsonSerializationVisitor implements ObjectNavigator.Visitor {
Preconditions.checkState(root.isJsonObject()); Preconditions.checkState(root.isJsonObject());
Object obj = f.get(parent); Object obj = f.get(parent);
JsonSerializer serializer = serializers.getHandlerFor(actualTypeOfField); JsonSerializer serializer = serializers.getHandlerFor(actualTypeOfField);
if (serializer == null && obj instanceof Map) {
serializer = serializers.getHandlerFor(Map.class);
}
if (serializer == null && obj instanceof Collection) {
serializer = serializers.getHandlerFor(Collection.class);
}
if (serializer != null) { if (serializer != null) {
JsonElement child = serializer.serialize(obj, actualTypeOfField, context); JsonElement child = serializer.serialize(obj, actualTypeOfField, context);
addChildAsElement(f, child); addChildAsElement(f, child);