From 21439c3e0b7c7396ad859149bcbf2197ac6334e1 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 8 Oct 2020 16:46:05 +0300 Subject: Apply some IDEA suggestions --- src/main/java/com/juick/service/ImagesServiceImpl.java | 4 ++-- src/main/java/com/juick/service/UserServiceImpl.java | 5 ++--- src/main/java/com/juick/service/activities/UndoAnnounceEvent.java | 4 ++-- src/main/java/com/juick/service/activities/UndoFollowEvent.java | 4 ++-- src/main/java/com/juick/service/component/SystemEvent.java | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) (limited to 'src/main/java/com/juick/service') diff --git a/src/main/java/com/juick/service/ImagesServiceImpl.java b/src/main/java/com/juick/service/ImagesServiceImpl.java index 4bdcd7d6..72d5b97c 100644 --- a/src/main/java/com/juick/service/ImagesServiceImpl.java +++ b/src/main/java/com/juick/service/ImagesServiceImpl.java @@ -28,8 +28,8 @@ import java.io.IOException; import java.nio.file.Paths; public class ImagesServiceImpl implements ImagesService { - private ImageUtils imageUtils; - private String imgDir; + private final ImageUtils imageUtils; + private final String imgDir; public ImagesServiceImpl(String imgDir, String tmpDir) { this.imgDir = imgDir; diff --git a/src/main/java/com/juick/service/UserServiceImpl.java b/src/main/java/com/juick/service/UserServiceImpl.java index c5c49a4f..778872e9 100644 --- a/src/main/java/com/juick/service/UserServiceImpl.java +++ b/src/main/java/com/juick/service/UserServiceImpl.java @@ -17,10 +17,10 @@ package com.juick.service; -import com.juick.model.Message; -import com.juick.model.User; import com.juick.model.AnonymousUser; import com.juick.model.AuthResponse; +import com.juick.model.Message; +import com.juick.model.User; import com.juick.util.UsernameTakenException; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.RandomStringUtils; @@ -41,7 +41,6 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.Timestamp; -import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; diff --git a/src/main/java/com/juick/service/activities/UndoAnnounceEvent.java b/src/main/java/com/juick/service/activities/UndoAnnounceEvent.java index 6528f259..683e7f78 100644 --- a/src/main/java/com/juick/service/activities/UndoAnnounceEvent.java +++ b/src/main/java/com/juick/service/activities/UndoAnnounceEvent.java @@ -20,8 +20,8 @@ package com.juick.service.activities; import org.springframework.context.ApplicationEvent; public class UndoAnnounceEvent extends ApplicationEvent { - private String actorUri; - private String messageUri; + private final String actorUri; + private final String messageUri; public UndoAnnounceEvent(Object source, String actor, String messageUri) { super(source); diff --git a/src/main/java/com/juick/service/activities/UndoFollowEvent.java b/src/main/java/com/juick/service/activities/UndoFollowEvent.java index a71de980..2f5201a9 100644 --- a/src/main/java/com/juick/service/activities/UndoFollowEvent.java +++ b/src/main/java/com/juick/service/activities/UndoFollowEvent.java @@ -20,8 +20,8 @@ package com.juick.service.activities; import org.springframework.context.ApplicationEvent; public class UndoFollowEvent extends ApplicationEvent { - private String actor; - private String object; + private final String actor; + private final String object; /** * Create a new ApplicationEvent. * diff --git a/src/main/java/com/juick/service/component/SystemEvent.java b/src/main/java/com/juick/service/component/SystemEvent.java index 66fd84ca..749f6af8 100644 --- a/src/main/java/com/juick/service/component/SystemEvent.java +++ b/src/main/java/com/juick/service/component/SystemEvent.java @@ -21,7 +21,7 @@ import com.juick.www.api.SystemActivity; import org.springframework.context.ApplicationEvent; public class SystemEvent extends ApplicationEvent { - private SystemActivity activity; + private final SystemActivity activity; /** * Create a new ApplicationEvent. * -- cgit v1.2.3