Abstract records should never be directly referenced; fail as early as possible and explain what's going on.

This commit is contained in:
Par Winzell
2010-05-06 14:37:18 +00:00
parent 743ca150cf
commit f54c74e385
@@ -90,6 +90,9 @@ public class DepotMarshaller<T extends PersistentRecord>
{
_pClass = pClass;
Preconditions.checkArgument(!java.lang.reflect.Modifier.isAbstract(pClass.getModifiers()),
"Can't handle reference to abstract record: " + pClass.getName());
Entity entity = pClass.getAnnotation(Entity.class);
// see if this is a computed entity