Skip to content

Commit 575a8de

Browse files
committed
Objects.hash is safer
1 parent fb5525d commit 575a8de

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResPackage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public boolean equals(Object obj) {
177177

178178
@Override
179179
public int hashCode() {
180-
return Objects.hashCode(mResTable) ^ Integer.hashCode(mId);
180+
return Objects.hash(mResTable, mId);
181181
}
182182

183183
public ResValueFactory getValueFactory() {

brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResValuesFile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ public boolean equals(Object obj) {
7070

7171
@Override
7272
public int hashCode() {
73-
return Objects.hashCode(mType) ^ Objects.hashCode(mConfig);
73+
return Objects.hash(mType, mConfig);
7474
}
7575
}

0 commit comments

Comments
 (0)