- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (!(obj instanceof ServerInfo)) {
- return false;
- }
-
- final ServerInfo other = (ServerInfo) obj;
- return isVoting == other.isVoting && id.equals(other.id);
+ public boolean equals(final Object obj) {
+ return this == obj || obj instanceof ServerInfo other && isVoting == other.isVoting && id.equals(other.id);