Skip to content

Commit

Permalink
Return default sampling wait time when conversion fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Skejven authored and Jakub-Izbicki committed Oct 23, 2018
1 parent d94624e commit 16d944f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ public void setParameters(Map<String, String> params) throws ParametersException
.checkRange(height, 1, MAX_SIZE,
"Height should be greater than 0 and smaller than " + MAX_SIZE);
} else {
samplingPeriod = Optional.ofNullable(params.get(SAMPLING_PERIOD_PARAM))
.map(NumberUtils::toInt)
.orElse(DEFAULT_SAMPLING_WAIT_PERIOD);
samplingPeriod = NumberUtils
.toInt(params.get(SAMPLING_PERIOD_PARAM), DEFAULT_SAMPLING_WAIT_PERIOD);
}
} else {
throw new ParametersException("You have to specify width, height parameter is optional");
Expand Down

0 comments on commit 16d944f

Please sign in to comment.