Skip to content

Commit 3399234

Browse files
committed
GH-349 use signature in equals() so that MethodInfo can be distinguished by signature
1 parent 38b3f59 commit 3399234

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

visualvm/libs.profiler/lib.profiler/src/org/graalvm/visualvm/lib/jfluid/results/cpu/StackTraceSnapshotBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ public boolean equals(Object obj) {
164164
if (!Objects.equals(methodName, other.methodName)) {
165165
return false;
166166
}
167+
if (!Objects.equals(signature, other.signature)) {
168+
return false;
169+
}
167170
return true;
168171
}
169172

@@ -172,6 +175,7 @@ public int hashCode() {
172175
int hash = 5;
173176
hash = 29 * hash + (this.className != null ? this.className.hashCode() : 0);
174177
hash = 29 * hash + (this.methodName != null ? this.methodName.hashCode() : 0);
178+
hash = 29 * hash + (this.signature != null ? this.signature.hashCode() : 0);
175179
return hash;
176180
}
177181

0 commit comments

Comments
 (0)