[#8035] Missing serialVersionUID when class implements Serializable interface

This commit is contained in:
lmw 2022-03-30 20:34:28 +08:00
parent 47a9064eec
commit c51b405565
7 changed files with 22 additions and 8 deletions

View File

@ -49,6 +49,8 @@ public class ClientConfigMetricRequest extends ServerRequest {
public static class MetricsKey implements Serializable { public static class MetricsKey implements Serializable {
private static final long serialVersionUID = -2731160029960311757L;
String type; String type;
String key; String key;

View File

@ -27,6 +27,8 @@ import java.util.Objects;
*/ */
public class ServerRemoteAbility implements Serializable { public class ServerRemoteAbility implements Serializable {
private static final long serialVersionUID = -3069795759506428390L;
/** /**
* if support remote connection. * if support remote connection.
*/ */

View File

@ -28,6 +28,8 @@ import java.util.concurrent.atomic.AtomicLong;
@SuppressWarnings({"PMD.AbstractClassShouldStartWithAbstractNamingRule"}) @SuppressWarnings({"PMD.AbstractClassShouldStartWithAbstractNamingRule"})
public abstract class Event implements Serializable { public abstract class Event implements Serializable {
private static final long serialVersionUID = -3731383194964997493L;
private static final AtomicLong SEQUENCE = new AtomicLong(0); private static final AtomicLong SEQUENCE = new AtomicLong(0);
private final long sequence = SEQUENCE.getAndIncrement(); private final long sequence = SEQUENCE.getAndIncrement();

View File

@ -30,6 +30,8 @@ import java.util.Map;
*/ */
public class ClusterInfo implements Serializable { public class ClusterInfo implements Serializable {
private static final long serialVersionUID = 2146881454057032105L;
private String clusterName; private String clusterName;
private AbstractHealthChecker healthChecker; private AbstractHealthChecker healthChecker;

View File

@ -27,6 +27,8 @@ import java.util.Map;
*/ */
public class IpAddressInfo implements Serializable { public class IpAddressInfo implements Serializable {
private static final long serialVersionUID = 6961930421629345179L;
private boolean valid; private boolean valid;
private Map<String, String> metadata; private Map<String, String> metadata;

View File

@ -29,6 +29,8 @@ import java.util.Map;
*/ */
public class ServiceDetailInfo implements Serializable { public class ServiceDetailInfo implements Serializable {
private static final long serialVersionUID = 6351606608785841722L;
private String namespace; private String namespace;
private String serviceName; private String serviceName;

View File

@ -27,6 +27,8 @@ import java.util.List;
*/ */
public class Subscribers implements Serializable { public class Subscribers implements Serializable {
private static final long serialVersionUID = -3075690233070417052L;
private List<Subscriber> subscribers; private List<Subscriber> subscribers;
public List<Subscriber> getSubscribers() { public List<Subscriber> getSubscribers() {