aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-10-19 14:46:41 +0300
committerGravatar Vitaly Takmazov2020-10-19 14:46:41 +0300
commitaf94a01336a8ec2c44a220548bb9ab409976b69d (patch)
tree933c4512aa6b84cda8a9905120ea09ba61116449 /src/main/java/com
parent17972adb2c94dd425c0144d71150212dab939d91 (diff)
serialVersionUID for all Serializable classes
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/juick/model/AnonymousUser.java4
-rw-r--r--src/main/java/com/juick/model/Attachment.java4
-rw-r--r--src/main/java/com/juick/model/Chat.java4
-rw-r--r--src/main/java/com/juick/model/Entity.java4
-rw-r--r--src/main/java/com/juick/model/Message.java4
-rw-r--r--src/main/java/com/juick/model/Photo.java4
-rw-r--r--src/main/java/com/juick/model/Reaction.java5
-rw-r--r--src/main/java/com/juick/model/Tag.java5
-rw-r--r--src/main/java/com/juick/model/User.java4
-rw-r--r--src/main/java/com/juick/service/activities/AnnounceEvent.java4
-rw-r--r--src/main/java/com/juick/service/activities/DeleteMessageEvent.java4
-rw-r--r--src/main/java/com/juick/service/activities/DeleteUserEvent.java4
-rw-r--r--src/main/java/com/juick/service/activities/FollowEvent.java4
-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/activities/UpdateEvent.java4
-rw-r--r--src/main/java/com/juick/service/component/AccountVerificationEvent.java4
-rw-r--r--src/main/java/com/juick/service/component/DisconnectedEvent.java8
-rw-r--r--src/main/java/com/juick/service/component/MailVerificationEvent.java4
-rw-r--r--src/main/java/com/juick/service/component/PingEvent.java4
-rw-r--r--src/main/java/com/juick/service/component/SystemEvent.java4
-rw-r--r--src/main/java/com/juick/service/component/UserUpdatedEvent.java4
-rw-r--r--src/main/java/com/juick/service/security/entities/JuickUser.java4
-rw-r--r--src/main/java/com/juick/util/HttpBadRequestException.java5
-rw-r--r--src/main/java/com/juick/util/HttpForbiddenException.java5
-rw-r--r--src/main/java/com/juick/util/HttpNotFoundException.java5
-rw-r--r--src/main/java/com/juick/util/PrettyTimeFormatter.java5
-rw-r--r--src/main/java/com/juick/util/UsernameTakenException.java5
-rw-r--r--src/main/java/com/juick/www/api/Users.java5
-rw-r--r--src/main/java/com/juick/www/rss/extension/JuickModuleImpl.java4
30 files changed, 131 insertions, 1 deletions
diff --git a/src/main/java/com/juick/model/AnonymousUser.java b/src/main/java/com/juick/model/AnonymousUser.java
index 127e8e7f..387a9f32 100644
--- a/src/main/java/com/juick/model/AnonymousUser.java
+++ b/src/main/java/com/juick/model/AnonymousUser.java
@@ -21,6 +21,10 @@ package com.juick.model;
* Created by aalexeev on 12/11/16.
*/
public final class AnonymousUser extends User {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -2711112452256383258L;
public static final AnonymousUser INSTANCE = new AnonymousUser();
private AnonymousUser() {
diff --git a/src/main/java/com/juick/model/Attachment.java b/src/main/java/com/juick/model/Attachment.java
index 485c69bc..9b2c29cb 100644
--- a/src/main/java/com/juick/model/Attachment.java
+++ b/src/main/java/com/juick/model/Attachment.java
@@ -20,6 +20,10 @@ package com.juick.model;
import java.io.Serializable;
public class Attachment implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5045908853672470897L;
private String url;
private Integer height;
private Integer width;
diff --git a/src/main/java/com/juick/model/Chat.java b/src/main/java/com/juick/model/Chat.java
index e72afb30..6d876093 100644
--- a/src/main/java/com/juick/model/Chat.java
+++ b/src/main/java/com/juick/model/Chat.java
@@ -22,6 +22,10 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.Instant;
public class Chat extends User {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6403537597231864691L;
private Instant lastMessageTimestamp;
private String lastMessageText;
diff --git a/src/main/java/com/juick/model/Entity.java b/src/main/java/com/juick/model/Entity.java
index 4cea7a6f..e55dd5c4 100644
--- a/src/main/java/com/juick/model/Entity.java
+++ b/src/main/java/com/juick/model/Entity.java
@@ -20,6 +20,10 @@ package com.juick.model;
import java.io.Serializable;
public class Entity implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1224678482278361917L;
private String type;
private String url;
private String text;
diff --git a/src/main/java/com/juick/model/Message.java b/src/main/java/com/juick/model/Message.java
index 5ad4fb26..19958e9f 100644
--- a/src/main/java/com/juick/model/Message.java
+++ b/src/main/java/com/juick/model/Message.java
@@ -40,6 +40,10 @@ import java.util.Set;
@XmlRootElement(name = "juick", namespace = "http://juick.com/message")
@XmlAccessorType()
public class Message implements Comparable<Message>, Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8974267615566193266L;
private int mid = 0;
private int rid = 0;
private int replyto = 0;
diff --git a/src/main/java/com/juick/model/Photo.java b/src/main/java/com/juick/model/Photo.java
index e759f70d..b2aeec08 100644
--- a/src/main/java/com/juick/model/Photo.java
+++ b/src/main/java/com/juick/model/Photo.java
@@ -25,6 +25,10 @@ import java.io.Serializable;
// used for compatibility
@Deprecated
public class Photo implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4344864834480242698L;
private String small;
private String medium;
private String thumbnail;
diff --git a/src/main/java/com/juick/model/Reaction.java b/src/main/java/com/juick/model/Reaction.java
index 4b3501d4..bd8c69ec 100644
--- a/src/main/java/com/juick/model/Reaction.java
+++ b/src/main/java/com/juick/model/Reaction.java
@@ -23,6 +23,11 @@ import java.io.Serializable;
public class Reaction implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6055430982255268594L;
+
public static final int LIKE = 1;
private final int id;
diff --git a/src/main/java/com/juick/model/Tag.java b/src/main/java/com/juick/model/Tag.java
index 75266303..53f451d3 100644
--- a/src/main/java/com/juick/model/Tag.java
+++ b/src/main/java/com/juick/model/Tag.java
@@ -29,6 +29,11 @@ import java.util.Objects;
@XmlRootElement(name = "tag", namespace = "http://juick.com/message")
@XmlAccessorType(XmlAccessType.FIELD)
public class Tag implements Comparable<Tag>, Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2665342664215832275L;
+
@XmlValue
private String name;
diff --git a/src/main/java/com/juick/model/User.java b/src/main/java/com/juick/model/User.java
index b43257ed..ad509c28 100644
--- a/src/main/java/com/juick/model/User.java
+++ b/src/main/java/com/juick/model/User.java
@@ -39,6 +39,10 @@ import java.util.Objects;
@XmlRootElement(name = "user", namespace = "http://juick.com/user")
@XmlAccessorType()
public class User implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -914973098049669133L;
private int uid;
private String name;
private String avatar;
diff --git a/src/main/java/com/juick/service/activities/AnnounceEvent.java b/src/main/java/com/juick/service/activities/AnnounceEvent.java
index 25d5ae39..fdc477ba 100644
--- a/src/main/java/com/juick/service/activities/AnnounceEvent.java
+++ b/src/main/java/com/juick/service/activities/AnnounceEvent.java
@@ -20,6 +20,10 @@ package com.juick.service.activities;
import org.springframework.context.ApplicationEvent;
public class AnnounceEvent extends ApplicationEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4679819986125805564L;
private final String actorUri;
private final String messageUri;
diff --git a/src/main/java/com/juick/service/activities/DeleteMessageEvent.java b/src/main/java/com/juick/service/activities/DeleteMessageEvent.java
index f58944fb..23403a10 100644
--- a/src/main/java/com/juick/service/activities/DeleteMessageEvent.java
+++ b/src/main/java/com/juick/service/activities/DeleteMessageEvent.java
@@ -21,6 +21,10 @@ import com.juick.model.Message;
import org.springframework.context.ApplicationEvent;
public class DeleteMessageEvent extends ApplicationEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 411459342784951699L;
private final Message message;
/**
* Create a new ApplicationEvent.
diff --git a/src/main/java/com/juick/service/activities/DeleteUserEvent.java b/src/main/java/com/juick/service/activities/DeleteUserEvent.java
index 7478657d..2a244758 100644
--- a/src/main/java/com/juick/service/activities/DeleteUserEvent.java
+++ b/src/main/java/com/juick/service/activities/DeleteUserEvent.java
@@ -20,6 +20,10 @@ package com.juick.service.activities;
import org.springframework.context.ApplicationEvent;
public class DeleteUserEvent extends ApplicationEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 634686893256259138L;
private final String userUri;
/**
* Create a new ApplicationEvent.
diff --git a/src/main/java/com/juick/service/activities/FollowEvent.java b/src/main/java/com/juick/service/activities/FollowEvent.java
index de99b6f8..f2c79713 100644
--- a/src/main/java/com/juick/service/activities/FollowEvent.java
+++ b/src/main/java/com/juick/service/activities/FollowEvent.java
@@ -21,6 +21,10 @@ import com.juick.www.api.activity.model.activities.Follow;
import org.springframework.context.ApplicationEvent;
public class FollowEvent extends ApplicationEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1128810954341470480L;
private final Follow request;
/**
* Create a new ApplicationEvent.
diff --git a/src/main/java/com/juick/service/activities/UndoAnnounceEvent.java b/src/main/java/com/juick/service/activities/UndoAnnounceEvent.java
index 683e7f78..a44968c2 100644
--- a/src/main/java/com/juick/service/activities/UndoAnnounceEvent.java
+++ b/src/main/java/com/juick/service/activities/UndoAnnounceEvent.java
@@ -20,6 +20,10 @@ package com.juick.service.activities;
import org.springframework.context.ApplicationEvent;
public class UndoAnnounceEvent extends ApplicationEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8563617088145835564L;
private final String actorUri;
private final String messageUri;
diff --git a/src/main/java/com/juick/service/activities/UndoFollowEvent.java b/src/main/java/com/juick/service/activities/UndoFollowEvent.java
index 2f5201a9..e3c93c73 100644
--- a/src/main/java/com/juick/service/activities/UndoFollowEvent.java
+++ b/src/main/java/com/juick/service/activities/UndoFollowEvent.java
@@ -20,6 +20,10 @@ package com.juick.service.activities;
import org.springframework.context.ApplicationEvent;
public class UndoFollowEvent extends ApplicationEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 8421957930088395402L;
private final String actor;
private final String object;
/**
diff --git a/src/main/java/com/juick/service/activities/UpdateEvent.java b/src/main/java/com/juick/service/activities/UpdateEvent.java
index c5cceb24..0567b701 100644
--- a/src/main/java/com/juick/service/activities/UpdateEvent.java
+++ b/src/main/java/com/juick/service/activities/UpdateEvent.java
@@ -21,6 +21,10 @@ import com.juick.model.User;
import org.springframework.context.ApplicationEvent;
public class UpdateEvent extends ApplicationEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8314935452761305978L;
private final User actor;
private final String messageUri;
/**
diff --git a/src/main/java/com/juick/service/component/AccountVerificationEvent.java b/src/main/java/com/juick/service/component/AccountVerificationEvent.java
index 89b2bfca..640a3a1b 100644
--- a/src/main/java/com/juick/service/component/AccountVerificationEvent.java
+++ b/src/main/java/com/juick/service/component/AccountVerificationEvent.java
@@ -20,6 +20,10 @@ package com.juick.service.component;
import org.springframework.context.ApplicationEvent;
public class AccountVerificationEvent extends ApplicationEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4861598213948653079L;
private final String email;
private final String code;
/**
diff --git a/src/main/java/com/juick/service/component/DisconnectedEvent.java b/src/main/java/com/juick/service/component/DisconnectedEvent.java
index 4f856efa..62a14faa 100644
--- a/src/main/java/com/juick/service/component/DisconnectedEvent.java
+++ b/src/main/java/com/juick/service/component/DisconnectedEvent.java
@@ -21,9 +21,15 @@ import org.springframework.context.ApplicationEvent;
public class DisconnectedEvent extends ApplicationEvent {
/**
+ *
+ */
+ private static final long serialVersionUID = -695682307925763191L;
+
+ /**
* Create a new ApplicationEvent.
*
- * @param source the object on which the event initially occurred (never {@code null})
+ * @param source the object on which the event initially occurred (never
+ * {@code null})
*/
public DisconnectedEvent(Object source) {
super(source);
diff --git a/src/main/java/com/juick/service/component/MailVerificationEvent.java b/src/main/java/com/juick/service/component/MailVerificationEvent.java
index 0d992159..098595c4 100644
--- a/src/main/java/com/juick/service/component/MailVerificationEvent.java
+++ b/src/main/java/com/juick/service/component/MailVerificationEvent.java
@@ -20,6 +20,10 @@ package com.juick.service.component;
import org.springframework.context.ApplicationEvent;
public class MailVerificationEvent extends ApplicationEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 8257057798323708656L;
private final String email;
private final String code;
/**
diff --git a/src/main/java/com/juick/service/component/PingEvent.java b/src/main/java/com/juick/service/component/PingEvent.java
index dc5a18d3..65cede15 100644
--- a/src/main/java/com/juick/service/component/PingEvent.java
+++ b/src/main/java/com/juick/service/component/PingEvent.java
@@ -21,6 +21,10 @@ import com.juick.model.User;
import org.springframework.context.ApplicationEvent;
public class PingEvent extends ApplicationEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6015851031167105060L;
private final User pinger;
/**
* 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 749f6af8..7a98fbbf 100644
--- a/src/main/java/com/juick/service/component/SystemEvent.java
+++ b/src/main/java/com/juick/service/component/SystemEvent.java
@@ -21,6 +21,10 @@ import com.juick.www.api.SystemActivity;
import org.springframework.context.ApplicationEvent;
public class SystemEvent extends ApplicationEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4755185790820142725L;
private final SystemActivity activity;
/**
* Create a new ApplicationEvent.
diff --git a/src/main/java/com/juick/service/component/UserUpdatedEvent.java b/src/main/java/com/juick/service/component/UserUpdatedEvent.java
index e1d1f907..be6ab62d 100644
--- a/src/main/java/com/juick/service/component/UserUpdatedEvent.java
+++ b/src/main/java/com/juick/service/component/UserUpdatedEvent.java
@@ -22,6 +22,10 @@ import org.springframework.context.ApplicationEvent;
import org.springframework.lang.NonNull;
public class UserUpdatedEvent extends ApplicationEvent {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6155526107375819851L;
private final User user;
/**
* Generated when user is updated (avatar changed, etc).
diff --git a/src/main/java/com/juick/service/security/entities/JuickUser.java b/src/main/java/com/juick/service/security/entities/JuickUser.java
index b8cfa92a..243e0465 100644
--- a/src/main/java/com/juick/service/security/entities/JuickUser.java
+++ b/src/main/java/com/juick/service/security/entities/JuickUser.java
@@ -32,6 +32,10 @@ import java.util.List;
* Created by aalexeev on 11/21/16.
*/
public class JuickUser implements UserDetails {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5359075078945208548L;
static final GrantedAuthority ROLE_USER = new SimpleGrantedAuthority("ROLE_USER");
static final GrantedAuthority ROLE_ADMIN = new SimpleGrantedAuthority("ROLE_ADMIN");
static final GrantedAuthority ROLE_ANONYMOUS = new SimpleGrantedAuthority("ROLE_ANONYMOUS");
diff --git a/src/main/java/com/juick/util/HttpBadRequestException.java b/src/main/java/com/juick/util/HttpBadRequestException.java
index 386b52df..4b4faa4a 100644
--- a/src/main/java/com/juick/util/HttpBadRequestException.java
+++ b/src/main/java/com/juick/util/HttpBadRequestException.java
@@ -25,6 +25,11 @@ import org.springframework.web.bind.annotation.ResponseStatus;
*/
@ResponseStatus(value = HttpStatus.BAD_REQUEST)
public class HttpBadRequestException extends RuntimeException {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2034547017639929277L;
+
public HttpBadRequestException() {
super("the request was bad", null, false, false);
}
diff --git a/src/main/java/com/juick/util/HttpForbiddenException.java b/src/main/java/com/juick/util/HttpForbiddenException.java
index e2211574..2684e1ab 100644
--- a/src/main/java/com/juick/util/HttpForbiddenException.java
+++ b/src/main/java/com/juick/util/HttpForbiddenException.java
@@ -26,6 +26,11 @@ import org.springframework.web.bind.annotation.ResponseStatus;
*/
@ResponseStatus(value = HttpStatus.FORBIDDEN)
public class HttpForbiddenException extends RuntimeException {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8001596218646655068L;
+
public HttpForbiddenException() {
super(StringUtils.EMPTY, null, false, false);
}
diff --git a/src/main/java/com/juick/util/HttpNotFoundException.java b/src/main/java/com/juick/util/HttpNotFoundException.java
index f9d1ffbe..0e8ee9d9 100644
--- a/src/main/java/com/juick/util/HttpNotFoundException.java
+++ b/src/main/java/com/juick/util/HttpNotFoundException.java
@@ -26,6 +26,11 @@ import org.springframework.web.bind.annotation.ResponseStatus;
*/
@ResponseStatus(value = HttpStatus.NOT_FOUND)
public class HttpNotFoundException extends RuntimeException {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6136243111317477522L;
+
public HttpNotFoundException() {
super(StringUtils.EMPTY, null, false, false);
}
diff --git a/src/main/java/com/juick/util/PrettyTimeFormatter.java b/src/main/java/com/juick/util/PrettyTimeFormatter.java
index 34a230f5..5c736413 100644
--- a/src/main/java/com/juick/util/PrettyTimeFormatter.java
+++ b/src/main/java/com/juick/util/PrettyTimeFormatter.java
@@ -33,6 +33,11 @@ public class PrettyTimeFormatter {
// Cache PrettyTime per locale. LRU cache to prevent memory leak.
private static final Map<Locale, PrettyTime> PRETTY_TIME_LOCALE_MAP =
new LinkedHashMap<>(MAX_CACHE_SIZE + 1, 1.1F, true) {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1828878791879310392L;
+
@Override
protected boolean removeEldestEntry(Map.Entry<Locale, PrettyTime> eldest) {
return size() > MAX_CACHE_SIZE;
diff --git a/src/main/java/com/juick/util/UsernameTakenException.java b/src/main/java/com/juick/util/UsernameTakenException.java
index ee787e99..45eb4448 100644
--- a/src/main/java/com/juick/util/UsernameTakenException.java
+++ b/src/main/java/com/juick/util/UsernameTakenException.java
@@ -18,6 +18,11 @@
package com.juick.util;
public class UsernameTakenException extends RuntimeException {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5182991814500998221L;
+
public UsernameTakenException() {
super("Username taken", null, false, false);
}
diff --git a/src/main/java/com/juick/www/api/Users.java b/src/main/java/com/juick/www/api/Users.java
index 8743a275..102faa7c 100644
--- a/src/main/java/com/juick/www/api/Users.java
+++ b/src/main/java/com/juick/www/api/Users.java
@@ -255,6 +255,11 @@ public class Users {
}
public class SecureUser extends User {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 4789822030962055525L;
+
public String getHash() {
return getAuthHash();
}
diff --git a/src/main/java/com/juick/www/rss/extension/JuickModuleImpl.java b/src/main/java/com/juick/www/rss/extension/JuickModuleImpl.java
index f4ad25d0..5c6b60cb 100644
--- a/src/main/java/com/juick/www/rss/extension/JuickModuleImpl.java
+++ b/src/main/java/com/juick/www/rss/extension/JuickModuleImpl.java
@@ -25,6 +25,10 @@ import com.rometools.rome.feed.module.ModuleImpl;
*/
public class JuickModuleImpl extends ModuleImpl implements JuickModule {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3153134577240725085L;
private Integer uid;
public JuickModuleImpl() {