Skip to content

Commit 43e18b2

Browse files
committed
Tweaking approach to avoid auto-boxing
1 parent 8b96603 commit 43e18b2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

utils/config-utils/src/main/java/datadog/trace/api/ConfigSetting.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,13 @@ public boolean equals(Object o) {
133133

134134
@Override
135135
public int hashCode() {
136-
return HashingUtils.addToHash(HashingUtils.hash(key, value, origin, seqId), configId);
136+
int hash = 0;
137+
hash = HashingUtils.addToHash(hash, key);
138+
hash = HashingUtils.addToHash(hash, value);
139+
hash = HashingUtils.addToHash(hash, origin);
140+
hash = HashingUtils.addToHash(hash, seqId);
141+
hash = HashingUtils.addToHash(hash, configId);
142+
return hash;
137143
}
138144

139145
@Override

0 commit comments

Comments
 (0)