Skip to content

Commit e9922dd

Browse files
committed
Fix JSO equals/hashCode javadoc following recent changes
JSO equals/hashCode now delegate to same-named native JS methods, and only use the previous default implementation when those methods don't exist. Bug: #9486 Bug-Link: #9486 Change-Id: I927b2f584e217924190d00ca3006745731ee32cf
1 parent 34c5331 commit e9922dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

user/src/com/google/gwt/core/client/JavaScriptObject.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ public final <T extends JavaScriptObject> T cast() {
127127
}
128128

129129
/**
130-
* Returns <code>true</code> if the objects are JavaScript identical
130+
* Calls a native JS <code>equals</code> method if any, otherwise
131+
* returns <code>true</code> if the objects are JavaScript identical
131132
* (triple-equals).
132133
*/
133134
@Override
@@ -139,7 +140,8 @@ public final boolean equals(Object other) {
139140
}
140141

141142
/**
142-
* Uses a monotonically increasing counter to assign a hash code to the
143+
* Calls a native JS <code>hashCode</code> method if any, otherwise
144+
* uses a monotonically increasing counter to assign a hash code to the
143145
* underlying JavaScript object. Do not call this method on non-modifiable
144146
* JavaScript objects.
145147
*

0 commit comments

Comments
 (0)