DATACMNS-867 - BasicPersistentEntity now rejects null Association.

Related ticket: DATACMNS-934.
This commit is contained in:
Oliver Gierke
2017-03-23 07:48:27 +01:00
parent 429dcbf659
commit 7ac12c3c3d
2 changed files with 6 additions and 13 deletions

View File

@@ -255,10 +255,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
*/
public void addAssociation(Association<P> association) {
if (association == null) {
LOGGER.warn(String.format(NULL_ASSOCIATION, this.getClass().getName()));
return;
}
Assert.notNull(association, "Association must not be null!");
if (!associations.contains(association)) {
associations.add(association);