Skip to content

Commit d485e02

Browse files
authored
Merge pull request #2722 from digma-ai/fix-env-equals
fix env equals
2 parents b247a89 + c0a1740 commit d485e02

File tree

1 file changed

+15
-1
lines changed
  • model/src/main/kotlin/org/digma/intellij/plugin/model/rest/environment

1 file changed

+15
-1
lines changed

model/src/main/kotlin/org/digma/intellij/plugin/model/rest/environment/Env.kt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,18 @@ constructor(
1616
val name: String,
1717
val type: EnvType,
1818
val lastActive: Date?
19-
)
19+
){
20+
override fun equals(other: Any?): Boolean {
21+
if (this === other) return true
22+
if (other !is Env) return false
23+
24+
return id == other.id && name == other.name && type == other.type
25+
}
26+
27+
override fun hashCode(): Int {
28+
var result = id.hashCode()
29+
result = 31 * result + name.hashCode()
30+
result = 31 * result + type.hashCode()
31+
return result
32+
}
33+
}

0 commit comments

Comments
 (0)