Navigation Menu

Skip to content

Commit

Permalink
fix: updates DatabaseInfo equals/hashcode
Browse files Browse the repository at this point in the history
To compare version retention period and earliest version time.
  • Loading branch information
thiagotnunes committed Nov 12, 2020
1 parent c7414ba commit a296742
Showing 1 changed file with 18 additions and 3 deletions.
Expand Up @@ -190,16 +190,31 @@ public boolean equals(Object o) {
return id.equals(that.id)
&& state == that.state
&& Objects.equals(createTime, that.createTime)
&& Objects.equals(restoreInfo, that.restoreInfo);
&& Objects.equals(restoreInfo, that.restoreInfo)
&& Objects.equals(versionRetentionPeriod, that.versionRetentionPeriod)
&& Objects.equals(earliestVersionTime, that.earliestVersionTime);
}

@Override
public int hashCode() {
return Objects.hash(id, state, createTime, restoreInfo);
return Objects.hash(
id,
state,
createTime,
restoreInfo,
versionRetentionPeriod,
earliestVersionTime);
}

@Override
public String toString() {
return String.format("Database[%s, %s, %s, %s]", id.getName(), state, createTime, restoreInfo);
return String.format(
"Database[%s, %s, %s, %s, %s, %s]",
id.getName(),
state,
createTime,
restoreInfo,
versionRetentionPeriod,
earliestVersionTime);
}
}

0 comments on commit a296742

Please sign in to comment.