Skip to content

Commit 26e5486

Browse files
authored
Merge pull request #86 from ITArray/SynchronousReports
check tolerance is not negative
2 parents f47b3df + 9caf924 commit 26e5486

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/net/itarray/automotion/validation/ResponsiveUIValidator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ public void setLinesColor(Color color) {
216216
* @return
217217
*/
218218
public ResponsiveUIValidator withTolerance(int tolerance) {
219+
if (tolerance < 0) {
220+
throw new IllegalArgumentException("tolerance needs to be greater or equal to zero, tolerance supplied was " + tolerance);
221+
}
219222
this.tolerance = scalar(tolerance);
220223
return this;
221224
}

0 commit comments

Comments
 (0)