diff --git a/vertx-core/src/main/java/io/vertx/core/net/impl/ServerID.java b/vertx-core/src/main/java/io/vertx/core/net/impl/ServerID.java index 46541c7b918..818a37a530d 100644 --- a/vertx-core/src/main/java/io/vertx/core/net/impl/ServerID.java +++ b/vertx-core/src/main/java/io/vertx/core/net/impl/ServerID.java @@ -11,30 +11,29 @@ package io.vertx.core.net.impl; -import java.io.Serializable; import java.util.Objects; /** * @author Tim Fox */ -public class ServerID implements Serializable { +public class ServerID { - public int port; - public String host; + private final int port; + private final String host; public ServerID(int port, String host) { this.port = port; this.host = host; } - public ServerID() { - } - @Override public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof ServerID)) return false; - + if (this == o) { + return true; + } + if (!(o instanceof ServerID)) { + return false; + } ServerID that = (ServerID) o; return port == that.port && Objects.equals(host, that.host); }