Skip to content

Commit 751b81a

Browse files
committed
[java] Fixes #12442
1 parent d1d30f8 commit 751b81a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

java/src/org/openqa/selenium/remote/RemoteWebElement.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,10 @@ public boolean equals(Object obj) {
262262
*/
263263
@Override
264264
public int hashCode() {
265-
return id.hashCode();
265+
if (id != null) {
266+
return id.hashCode();
267+
}
268+
return this.hashCode();
266269
}
267270

268271
/*

0 commit comments

Comments
 (0)