Polish code
- Remove formatter markers - Use StringBuilder in toString method Signed-off-by: Gregor Zurowski <gregor@zurowski.org>
This commit is contained in:
@@ -22,6 +22,7 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
* @author Gregor Zurowski
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EurekaInstanceCanceledEvent extends ApplicationEvent {
|
||||
@@ -66,14 +67,12 @@ public class EurekaInstanceCanceledEvent extends ApplicationEvent {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
// @formatter:off
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
EurekaInstanceCanceledEvent that = (EurekaInstanceCanceledEvent) o;
|
||||
return Objects.equals(appName, that.appName) &&
|
||||
Objects.equals(serverId, that.serverId) &&
|
||||
replication == replication;
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,13 +82,11 @@ public class EurekaInstanceCanceledEvent extends ApplicationEvent {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// @formatter:off
|
||||
return new StringBuilder("EurekaInstanceCanceledEvent{")
|
||||
.append("appName='").append(appName).append("', ")
|
||||
.append("serverId='").append(serverId).append("', ")
|
||||
.append("replication=").append(replication).append("}")
|
||||
.toString();
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
* @author Gregor Zurowski
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EurekaInstanceRegisteredEvent extends ApplicationEvent {
|
||||
@@ -68,14 +69,12 @@ public class EurekaInstanceRegisteredEvent extends ApplicationEvent {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
// @formatter:off
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
EurekaInstanceRegisteredEvent that = (EurekaInstanceRegisteredEvent) o;
|
||||
return Objects.equals(instanceInfo, that.instanceInfo) &&
|
||||
leaseDuration == leaseDuration &&
|
||||
replication == replication;
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,12 +84,10 @@ public class EurekaInstanceRegisteredEvent extends ApplicationEvent {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// @formatter:off
|
||||
return new StringBuilder("EurekaInstanceRegisteredEvent{")
|
||||
.append("instanceInfo=").append(instanceInfo).append(", ")
|
||||
.append("leaseDuration=").append(leaseDuration).append(", ")
|
||||
.append("replication=").append(replication).append("}")
|
||||
.toString();
|
||||
// @formatter:on
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
* @author Gregor Zurowski
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EurekaInstanceRenewedEvent extends ApplicationEvent {
|
||||
@@ -79,7 +80,6 @@ public class EurekaInstanceRenewedEvent extends ApplicationEvent {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
// @formatter:off
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
EurekaInstanceRenewedEvent that = (EurekaInstanceRenewedEvent) o;
|
||||
@@ -87,7 +87,6 @@ public class EurekaInstanceRenewedEvent extends ApplicationEvent {
|
||||
Objects.equals(serverId, that.serverId) &&
|
||||
Objects.equals(instanceInfo, that.instanceInfo) &&
|
||||
replication == that.replication;
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -97,11 +96,12 @@ public class EurekaInstanceRenewedEvent extends ApplicationEvent {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// @formatter:off
|
||||
return "EurekaInstanceRenewedEvent{" + "appName='" + appName + '\''
|
||||
+ ", serverId='" + serverId + '\'' + ", instanceInfo=" + instanceInfo
|
||||
+ ", replication=" + replication + '}';
|
||||
// @formatter:on
|
||||
return new StringBuilder("EurekaInstanceRenewedEvent{")
|
||||
.append("appName='").append(appName).append("', ")
|
||||
.append("serverId='").append(serverId).append("', ")
|
||||
.append("instanceInfo=").append(instanceInfo).append(", ")
|
||||
.append("replication=").append(replication).append("}")
|
||||
.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user