diff --git a/extractor/src/test/java/org/schabi/newpipe/downloader/ratelimiting/RateLimitedClientWrapper.java b/extractor/src/test/java/org/schabi/newpipe/downloader/ratelimiting/RateLimitedClientWrapper.java index 9d0f49599..fcd938373 100644 --- a/extractor/src/test/java/org/schabi/newpipe/downloader/ratelimiting/RateLimitedClientWrapper.java +++ b/extractor/src/test/java/org/schabi/newpipe/downloader/ratelimiting/RateLimitedClientWrapper.java @@ -56,7 +56,7 @@ public class RateLimitedClientWrapper { } final Response response = client.newCall(request).execute(); - if(response.code() != 429) { // 429 = Too many requests + if (response.code() != 429) { // 429 = Too many requests return response; } cause = new IllegalStateException("HTTP 429 - Too many requests"); diff --git a/extractor/src/test/java/org/schabi/newpipe/downloader/ratelimiting/limiter/RateLimiter.java b/extractor/src/test/java/org/schabi/newpipe/downloader/ratelimiting/limiter/RateLimiter.java index 4ad8a8221..5adf0915e 100644 --- a/extractor/src/test/java/org/schabi/newpipe/downloader/ratelimiting/limiter/RateLimiter.java +++ b/extractor/src/test/java/org/schabi/newpipe/downloader/ratelimiting/limiter/RateLimiter.java @@ -184,7 +184,7 @@ public abstract class RateLimiter { final TimeUnit unit, final double coldFactor ) { - if(warmupPeriod < 0) { + if (warmupPeriod < 0) { throw new IllegalArgumentException( "warmupPeriod must not be negative: " + warmupPeriod); } @@ -248,7 +248,7 @@ public abstract class RateLimiter { * @throws IllegalArgumentException if {@code permitsPerSecond} is negative or zero */ public final void setRate(final double permitsPerSecond) { - if(permitsPerSecond <= 0.0) { + if (permitsPerSecond <= 0.0) { throw new IllegalArgumentException("rate must be positive"); } synchronized (mutex()) { @@ -489,7 +489,7 @@ public abstract class RateLimiter { } private static void checkPermits(final int permits) { - if(permits <= 0.0) { + if (permits <= 0.0) { throw new IllegalArgumentException( "Requested permits (" + permits + ") must be positive"); }