Fix integration tests that fell out from some benchmarking.
This commit is contained in:
parent
9cf579ef01
commit
3c4d121dc8
@ -56,10 +56,10 @@ public final class MiniGson {
|
||||
factories.add(TypeAdapters.DOUBLE_FACTORY);
|
||||
factories.add(TypeAdapters.LONG_FACTORY);
|
||||
factories.add(TypeAdapters.STRING_FACTORY);
|
||||
factories.add(ReflectiveTypeAdapter.FACTORY);
|
||||
factories.add(CollectionTypeAdapter.FACTORY);
|
||||
factories.add(StringToValueMapTypeAdapter.FACTORY);
|
||||
factories.add(ArrayTypeAdapter.FACTORY);
|
||||
factories.add(ReflectiveTypeAdapter.FACTORY);
|
||||
this.factories = Collections.unmodifiableList(factories);
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,7 @@ final class ReflectiveTypeAdapter<T> extends TypeAdapter<T> {
|
||||
Map<String, BoundField<?>> result = new LinkedHashMap<String, BoundField<?>>();
|
||||
while (raw != Object.class) {
|
||||
for (Field field : raw.getDeclaredFields()) {
|
||||
field.setAccessible(true); // TODO: don't call setAccessible unless necessary
|
||||
Type fieldType = $Gson$Types.resolve(type.getType(), raw, field.getGenericType());
|
||||
BoundField<?> boundField = BoundField.create(context, field, TypeToken.get(fieldType));
|
||||
result.put(boundField.name, boundField);
|
||||
|
Loading…
Reference in New Issue
Block a user