Skip to content

Commit

Permalink
Ship use new hash function
Browse files Browse the repository at this point in the history
Reviewed By: okelepko

Differential Revision: D54265549

fbshipit-source-id: 8fc9e33843b5e2a5dabf6a7d833e8572bc644df6
  • Loading branch information
MrMannWood authored and facebook-github-bot committed Feb 27, 2024
1 parent 1971347 commit 011637b
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public class ContextChain implements Parcelable {
private String mSerializedNodeString;

private static boolean sUseConcurrentHashMap = false;
private static boolean sUseNewHashFunction = false;

public ContextChain(
final String tag,
Expand Down Expand Up @@ -102,10 +101,6 @@ public static void setUseConcurrentHashMap(boolean useConcurrentHashMap) {
sUseConcurrentHashMap = useConcurrentHashMap;
}

public static void setUseNewHashFunction(boolean useNewHashFunction) {
sUseNewHashFunction = useNewHashFunction;
}

public String getName() {
return mName;
}
Expand Down Expand Up @@ -195,13 +190,7 @@ public boolean equals(@Nullable Object obj) {

@Override
public int hashCode() {
if (sUseNewHashFunction) {
return Objects.hash(mParent, getNodeString());
} else {
int result = super.hashCode();
result = 31 * result + (getNodeString().hashCode());
return result;
}
return Objects.hash(mParent, getNodeString());
}

@Override
Expand Down

0 comments on commit 011637b

Please sign in to comment.