SEC-400: Clarify exception if getter returns null.

This commit is contained in:
Ben Alex 2006-11-26 03:24:11 +00:00
parent 1a486e584b
commit e79a28875f
1 changed files with 1 additions and 0 deletions

View File

@ -83,6 +83,7 @@ public class ObjectIdentityImpl implements ObjectIdentity {
throw new IdentityUnavailableException("Could not extract identity from object " + object, e);
}
Assert.notNull(result, "getId() is required to return a non-null value");
Assert.isInstanceOf(Serializable.class, result, "Getter must provide a return value of type Serializable");
this.identifier = (Serializable) result;
}