DATACMNS-1224 - Polishing of nullability annotations.

Refactored code to properly check for null fields in Eclipse. Added warning suppressions where suitable.
This commit is contained in:
Oliver Gierke
2017-11-29 23:12:36 +01:00
parent d2a42f780a
commit 34cadd0b9b
16 changed files with 69 additions and 36 deletions

View File

@@ -75,6 +75,7 @@ public class AbstractAggregateRoot<A extends AbstractAggregateRoot<A>> {
* @param aggregate must not be {@literal null}.
* @return the aggregate
*/
@SuppressWarnings("unchecked")
protected final A andEventsFrom(A aggregate) {
Assert.notNull(aggregate, "Aggregate must not be null!");
@@ -92,6 +93,7 @@ public class AbstractAggregateRoot<A extends AbstractAggregateRoot<A>> {
* @return the aggregate
* @see #registerEvent(Object)
*/
@SuppressWarnings("unchecked")
protected final A andEvent(Object event) {
registerEvent(event);