File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/org/springframework/data/ebean/domain Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3636@ MappedSuperclass
3737public abstract class AbstractAggregateRoot extends AbstractEntity {
3838 @ Transient
39- private transient final List <Object > domainEvents = new ArrayList <>();
39+ private transient final List <DomainEvent > domainEvents = new ArrayList <>();
4040
4141 /**
4242 * Registers the given event object for publication on a call to a Spring Data repository's save methods.
4343 *
4444 * @param event must not be {@literal null}.
4545 * @return the event that has been added.
4646 */
47- protected <T > T registerEvent (T event ) {
47+ protected <T extends DomainEvent > T registerEvent (T event ) {
4848 Assert .notNull (event , "Domain event must not be null!" );
4949
5050 this .domainEvents .add (event );
@@ -64,7 +64,7 @@ protected void clearDomainEvents() {
6464 * All domain events currently captured by the aggregate.
6565 */
6666 @ DomainEvents
67- protected Collection <Object > domainEvents () {
67+ protected Collection <DomainEvent > domainEvents () {
6868 return Collections .unmodifiableList (domainEvents );
6969 }
7070
You can’t perform that action at this time.
0 commit comments