Updates equals() for events.

Fixes gh-3918
This commit is contained in:
spencergibb
2020-11-02 12:57:40 -05:00
parent 08add768d0
commit ce82ea3b71
2 changed files with 6 additions and 4 deletions

View File

@@ -74,8 +74,9 @@ public class EurekaInstanceCanceledEvent extends ApplicationEvent {
return false;
}
EurekaInstanceCanceledEvent that = (EurekaInstanceCanceledEvent) o;
return Objects.equals(appName, that.appName)
&& Objects.equals(serverId, that.serverId) && replication == replication;
return this.replication == that.replication
&& Objects.equals(this.appName, that.appName)
&& Objects.equals(this.serverId, that.serverId);
}
@Override

View File

@@ -76,8 +76,9 @@ public class EurekaInstanceRegisteredEvent extends ApplicationEvent {
return false;
}
EurekaInstanceRegisteredEvent that = (EurekaInstanceRegisteredEvent) o;
return Objects.equals(instanceInfo, that.instanceInfo)
&& leaseDuration == leaseDuration && replication == replication;
return this.leaseDuration == that.leaseDuration
&& this.replication == that.replication
&& Objects.equals(this.instanceInfo, that.instanceInfo);
}
@Override