From c9617232d5eeced643b510c108384619a7fc79b0 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 15 Dec 2022 19:51:49 +0300 Subject: Extract user to actor conversion code into Converter --- src/main/java/com/juick/service/PushQueriesServiceImpl.java | 1 - src/main/java/com/juick/service/activities/ActivityListener.java | 4 +++- src/main/java/com/juick/service/component/SystemEvent.java | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/juick/service') diff --git a/src/main/java/com/juick/service/PushQueriesServiceImpl.java b/src/main/java/com/juick/service/PushQueriesServiceImpl.java index 7f066ad7..0dfa59df 100644 --- a/src/main/java/com/juick/service/PushQueriesServiceImpl.java +++ b/src/main/java/com/juick/service/PushQueriesServiceImpl.java @@ -19,7 +19,6 @@ package com.juick.service; import org.apache.commons.collections4.CollectionUtils; import org.springframework.dao.DataIntegrityViolationException; -import org.springframework.dao.DuplicateKeyException; import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/juick/service/activities/ActivityListener.java b/src/main/java/com/juick/service/activities/ActivityListener.java index 3dcd123c..badda8a3 100644 --- a/src/main/java/com/juick/service/activities/ActivityListener.java +++ b/src/main/java/com/juick/service/activities/ActivityListener.java @@ -20,10 +20,12 @@ package com.juick.service.activities; import org.springframework.context.event.EventListener; import org.springframework.scheduling.annotation.Async; +import jakarta.annotation.Nonnull; + public interface ActivityListener { @Async @EventListener - void processFollowEvent(FollowEvent event); + void processFollowEvent(@Nonnull FollowEvent event); @Async @EventListener void undoFollowEvent(UndoFollowEvent event); diff --git a/src/main/java/com/juick/service/component/SystemEvent.java b/src/main/java/com/juick/service/component/SystemEvent.java index f4e3ff90..830813ad 100644 --- a/src/main/java/com/juick/service/component/SystemEvent.java +++ b/src/main/java/com/juick/service/component/SystemEvent.java @@ -23,6 +23,7 @@ import com.juick.www.api.SystemActivity; import org.springframework.context.ApplicationEvent; public class SystemEvent extends ApplicationEvent { + @Nonnull private final SystemActivity activity; /** * Create a new ApplicationEvent. -- cgit v1.2.3