Skip to content

Commit 0378fde

Browse files
committed
Fix checkstyle
1 parent e9dbcba commit 0378fde

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

extractor/src/test/java/org/schabi/newpipe/downloader/ratelimiting/RateLimitedClientWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public Response executeRequestWithLimit(final Request request) throws IOExceptio
5656
}
5757

5858
final Response response = client.newCall(request).execute();
59-
if(response.code() != 429) { // 429 = Too many requests
59+
if (response.code() != 429) { // 429 = Too many requests
6060
return response;
6161
}
6262
cause = new IllegalStateException("HTTP 429 - Too many requests");

extractor/src/test/java/org/schabi/newpipe/downloader/ratelimiting/limiter/RateLimiter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public static RateLimiter create(
184184
final TimeUnit unit,
185185
final double coldFactor
186186
) {
187-
if(warmupPeriod < 0) {
187+
if (warmupPeriod < 0) {
188188
throw new IllegalArgumentException(
189189
"warmupPeriod must not be negative: " + warmupPeriod);
190190
}
@@ -248,7 +248,7 @@ private Object mutex() {
248248
* @throws IllegalArgumentException if {@code permitsPerSecond} is negative or zero
249249
*/
250250
public final void setRate(final double permitsPerSecond) {
251-
if(permitsPerSecond <= 0.0) {
251+
if (permitsPerSecond <= 0.0) {
252252
throw new IllegalArgumentException("rate must be positive");
253253
}
254254
synchronized (mutex()) {
@@ -489,7 +489,7 @@ protected void sleepMicrosUninterruptibly(final long micros) {
489489
}
490490

491491
private static void checkPermits(final int permits) {
492-
if(permits <= 0.0) {
492+
if (permits <= 0.0) {
493493
throw new IllegalArgumentException(
494494
"Requested permits (" + permits + ") must be positive");
495495
}

0 commit comments

Comments
 (0)