Fixed issue 126 by ensuring that parameterized type deduction is not done for transient fields.

This commit is contained in:
Inderjeet Singh 2009-06-02 18:02:15 +00:00
parent 6d50bcea87
commit 4f0728f6a0
2 changed files with 4 additions and 3 deletions

View File

@ -133,11 +133,11 @@ final class ObjectNavigator {
Field[] fields = clazz.getDeclaredFields();
AccessibleObject.setAccessible(fields, true);
for (Field f : fields) {
TypeInfo fieldTypeInfo = TypeInfoFactory.getTypeInfoForField(f, objType);
Type actualTypeOfField = fieldTypeInfo.getActualType();
if (exclusionStrategy.shouldSkipField(f)) {
continue; // skip
} else {
TypeInfo fieldTypeInfo = TypeInfoFactory.getTypeInfoForField(f, objType);
Type actualTypeOfField = fieldTypeInfo.getActualType();
boolean visitedWithCustomHandler =
visitor.visitFieldUsingCustomHandler(f, actualTypeOfField, obj);
if (!visitedWithCustomHandler) {

View File

@ -219,7 +219,8 @@ public class TestTypes {
}
}
public static class ClassWithTransientFields {
public static class ClassWithTransientFields<T> {
public transient T transientT;
public final transient long transientLongValue;
private final long[] longValue;