Skip to content

Commit

Permalink
[java] Fixes #12442
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Aug 24, 2023
1 parent d1d30f8 commit 751b81a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion java/src/org/openqa/selenium/remote/RemoteWebElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ public boolean equals(Object obj) {
*/
@Override
public int hashCode() {
return id.hashCode();
if (id != null) {
return id.hashCode();
}
return this.hashCode();

This comment has been minimized.

Copy link
@asolntsev

asolntsev Aug 24, 2023

Contributor

@diemol Wait, doesn't this line cause endless loop? this.hashCode() calls the same method recursively.

This comment has been minimized.

Copy link
@diemol

diemol Aug 24, 2023

Author Member

Sorry for the typo! Just changed it to super.hashCode().

}

/*
Expand Down

0 comments on commit 751b81a

Please sign in to comment.