Skip to content

Commit 6aac64b

Browse files
committed
user story #1234009: adding hashCode and equals on space config
1 parent 7df92c7 commit 6aac64b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/main/java/com/microfocus/octane/plugins/configuration/SpaceConfiguration.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import org.codehaus.jackson.annotate.JsonIgnore;
2121
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
2222

23+
import java.util.Objects;
24+
2325
@JsonIgnoreProperties(ignoreUnknown = true)
2426
public class SpaceConfiguration {
2527

@@ -98,4 +100,17 @@ public RestConnector getRestConnector() {
98100
public void clearRestConnector() {
99101
restConnector = null;
100102
}
103+
104+
@Override
105+
public boolean equals(Object o) {
106+
if (this == o) return true;
107+
if (o == null || getClass() != o.getClass()) return false;
108+
SpaceConfiguration that = (SpaceConfiguration) o;
109+
return location.equals(that.location) && locationParts.equals(that.locationParts) && id.equals(that.id);
110+
}
111+
112+
@Override
113+
public int hashCode() {
114+
return Objects.hash(location, locationParts, id);
115+
}
101116
}

0 commit comments

Comments
 (0)