Skip to content

Commit

Permalink
Fix review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub-Izbicki committed Oct 22, 2018
1 parent 675de4c commit d94624e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
import com.cognifide.aet.job.api.exceptions.ParametersException;
import com.cognifide.aet.job.api.exceptions.ProcessingException;
import com.cognifide.aet.job.common.utils.Sampler;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Map;
import java.util.Optional;
import java.util.function.Supplier;
import org.apache.commons.lang3.math.NumberUtils;
import org.openqa.selenium.Dimension;
Expand Down Expand Up @@ -57,7 +56,7 @@ public class ResolutionModifier implements CollectorJob {

private static final int MAX_SAMPLES_THRESHOLD = 15;

public static final int SAMPLE_QUEUE_SIZE = 3;
private static final int SAMPLE_QUEUE_SIZE = 3;

private final WebDriver webDriver;

Expand Down Expand Up @@ -89,8 +88,9 @@ 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 = params.containsKey(SAMPLING_PERIOD_PARAM) ? NumberUtils
.toInt(params.get(SAMPLING_PERIOD_PARAM)) : DEFAULT_SAMPLING_WAIT_PERIOD;
samplingPeriod = Optional.ofNullable(params.get(SAMPLING_PERIOD_PARAM))
.map(NumberUtils::toInt)
.orElse(DEFAULT_SAMPLING_WAIT_PERIOD);
}
} else {
throw new ParametersException("You have to specify width, height parameter is optional");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package com.cognifide.aet.job.common.utils;

import java.util.LinkedList;
import java.util.function.Supplier;
import org.apache.commons.collections.buffer.CircularFifoBuffer;
import org.slf4j.Logger;
Expand Down

0 comments on commit d94624e

Please sign in to comment.