We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c149513 + 004fd7a commit 3088176Copy full SHA for 3088176
1 file changed
java/src/org/openqa/selenium/Rectangle.java
@@ -17,6 +17,8 @@
17
18
package org.openqa.selenium;
19
20
+import java.util.Objects;
21
+
22
public class Rectangle {
23
24
public int x;
@@ -73,16 +75,12 @@ public boolean equals(Object o) {
73
75
74
76
Rectangle rectangle = (Rectangle) o;
77
- if (!getPoint().equals(rectangle.getPoint())) {
- return false;
78
- }
79
- return getDimension().equals(rectangle.getDimension());
+ return x == rectangle.x && y == rectangle.y && height == rectangle.height
+ && width == rectangle.width;
80
}
81
82
@Override
83
public int hashCode() {
84
- int result = getPoint().hashCode();
85
- result = 31 * result + getDimension().hashCode();
86
- return result;
+ return Objects.hash(x, y, height, width);
87
88
0 commit comments