Skip to content

Commit c058210

Browse files
committed
A bit of code clean-up
1 parent 015f18e commit c058210

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/jdbc

dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/jdbc/DBInfo.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ public boolean equals(Object o) {
257257

258258
@Override
259259
public int hashCode() {
260-
int hash = HashingUtils.hash(type, subtype);
260+
int hash = 0;
261+
hash = HashingUtils.addToHash(hash, type);
262+
hash = HashingUtils.addToHash(hash, subtype);
261263
hash = HashingUtils.addToHash(hash, fullPropagationSupport);
262264
hash = HashingUtils.addToHash(hash, url);
263265
hash = HashingUtils.addToHash(hash, user);
@@ -266,6 +268,7 @@ public int hashCode() {
266268
hash = HashingUtils.addToHash(hash, host);
267269
hash = HashingUtils.addToHash(hash, port);
268270
hash = HashingUtils.addToHash(hash, warehouse);
269-
return HashingUtils.addToHash(hash, schema);
271+
hash = HashingUtils.addToHash(hash, schema);
272+
return hash;
270273
}
271274
}

0 commit comments

Comments
 (0)