Make GenRecordTask only honor @Transient, like DepotMarshaller.

We've chosen not to conflate Java transience with Depot non-persistence. It's a
little wonky to have to choose a particular memory model behavior just to have
a field not persisted in your record.
This commit is contained in:
Michael Bayne
2012-06-27 18:22:36 +00:00
parent 97be694e70
commit f7d7c586c0
2 changed files with 3 additions and 3 deletions
@@ -118,7 +118,7 @@ public class DepotMarshaller<T extends PersistentRecord> implements QueryMarshal
}
}
// the field must be public, non-static and non-transient
// the field must be public, non-static and non-@Transient
if (!java.lang.reflect.Modifier.isPublic(mods) ||
java.lang.reflect.Modifier.isStatic(mods) ||
field.getAnnotation(Transient.class) != null) {
@@ -343,13 +343,13 @@ public class GenRecordTask extends Task
/**
* Returns true if the supplied field is part of a persistent record (is a public, non-static,
* non-transient field).
* non-@Transient field).
*/
protected boolean isPersistentField (Field field)
{
int mods = field.getModifiers();
return Modifier.isPublic(mods) && !Modifier.isStatic(mods) &&
!Modifier.isTransient(mods) && !hasAnnotation(field, Transient.class);
!hasAnnotation(field, Transient.class);
}
/**