Skip to content

Commit 5503a50

Browse files
tbreisacherYannic
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 f6cdef8 commit 5503a50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
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)