Skip to content

Commit fbe41ac

Browse files
tbreisacherbrad4d
tbreisacher
authored andcommitted
Switch hashCode to not use toStringTree()
Node doesn't currently have a hashCode method so this will just fallback to the built in Object hashCode. But since this is only used in one HashMap (throwsDescriptions in JSDocInfo, which is likely to only have a few entries) I don't think having a highly accurate hashCode method is very important here. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=152752320
1 parent df86ffa commit fbe41ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/google/javascript/rhino/JSTypeExpression.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public boolean equals(Object other) {
111111

112112
@Override
113113
public int hashCode() {
114-
return root.toStringTree().hashCode();
114+
return root.hashCode();
115115
}
116116

117117
/**

0 commit comments

Comments
 (0)