aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-10-08 16:46:05 +0300
committerGravatar Vitaly Takmazov2020-10-08 16:46:05 +0300
commit21439c3e0b7c7396ad859149bcbf2197ac6334e1 (patch)
tree07d6874956fec3c13cb34e4cfbd1cc391bd34cae /src/main/java/com/juick/service
parent7229f06e0bc5c61dc17cb539c7b54273b66b16b6 (diff)
Apply some IDEA suggestions
Diffstat (limited to 'src/main/java/com/juick/service')
-rw-r--r--src/main/java/com/juick/service/ImagesServiceImpl.java4
-rw-r--r--src/main/java/com/juick/service/UserServiceImpl.java5
-rw-r--r--src/main/java/com/juick/service/activities/UndoAnnounceEvent.java4
-rw-r--r--src/main/java/com/juick/service/activities/UndoFollowEvent.java4
-rw-r--r--src/main/java/com/juick/service/component/SystemEvent.java2
5 files changed, 9 insertions, 10 deletions
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.
*