File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/main/java/com/assertthat/selenium_shutterbug/core Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -148,18 +148,14 @@ public void save(String path) {
148
148
}
149
149
150
150
/**
151
- * @param o Object to compare with
151
+ * @param other Snapshot to compare with
152
152
* @param deviation allowed deviation while comparing.
153
153
* @return true if the the percentage of differences
154
154
* between current image and provided one is less than or equal to <b>deviation</b>
155
155
*/
156
- public boolean equals (Object o , double deviation ) {
157
- if (this == o ) return true ;
158
- if (!(o instanceof Snapshot )) return false ;
159
-
160
- Snapshot that = (Snapshot ) o ;
161
-
162
- return getImage () != null ? ImageProcessor .imagesAreEquals (getImage (), that .getImage (), deviation ) : that .getImage () == null ;
156
+ public boolean equals (Snapshot other , double deviation ) {
157
+ if (this == other ) return true ;
158
+ return getImage () != null ? ImageProcessor .imagesAreEquals (getImage (), other .getImage (), deviation ) : other .getImage () == null ;
163
159
}
164
160
165
161
/**
You can’t perform that action at this time.
0 commit comments