We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 67a66a5 + 3845685 commit 96258adCopy full SHA for 96258ad
src/main/java/org/cloudburstmc/nbt/NbtMap.java
@@ -386,11 +386,9 @@ public boolean equals(Object o) {
386
public int hashCode() {
387
if (this.hashCodeGenerated)
388
return this.hashCode;
389
- int result = 1;
390
- for (Entry<String, Object> stringObjectEntry : this.map.entrySet()) {
391
- result = 31 * result + (stringObjectEntry.getKey().hashCode()
392
- ^ NbtUtils.hashCode(stringObjectEntry.getValue()));
393
- }
+ int result = 0;
+ for (Entry<String, Object> stringObjectEntry : this.map.entrySet())
+ result += stringObjectEntry.getKey().hashCode() ^ NbtUtils.hashCode(stringObjectEntry.getValue());
394
this.hashCode = result;
395
this.hashCodeGenerated = true;
396
return result;
0 commit comments