2
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-08-22 09:57:38 +00:00

Fix checkstyle

This commit is contained in:
TobiGr 2025-07-27 12:34:12 +02:00
parent e9dbcba308
commit 0378fdee5c
2 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ public class RateLimitedClientWrapper {
} }
final Response response = client.newCall(request).execute(); 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; return response;
} }
cause = new IllegalStateException("HTTP 429 - Too many requests"); cause = new IllegalStateException("HTTP 429 - Too many requests");

View File

@ -184,7 +184,7 @@ public abstract class RateLimiter {
final TimeUnit unit, final TimeUnit unit,
final double coldFactor final double coldFactor
) { ) {
if(warmupPeriod < 0) { if (warmupPeriod < 0) {
throw new IllegalArgumentException( throw new IllegalArgumentException(
"warmupPeriod must not be negative: " + warmupPeriod); "warmupPeriod must not be negative: " + warmupPeriod);
} }
@ -248,7 +248,7 @@ public abstract class RateLimiter {
* @throws IllegalArgumentException if {@code permitsPerSecond} is negative or zero * @throws IllegalArgumentException if {@code permitsPerSecond} is negative or zero
*/ */
public final void setRate(final double permitsPerSecond) { public final void setRate(final double permitsPerSecond) {
if(permitsPerSecond <= 0.0) { if (permitsPerSecond <= 0.0) {
throw new IllegalArgumentException("rate must be positive"); throw new IllegalArgumentException("rate must be positive");
} }
synchronized (mutex()) { synchronized (mutex()) {
@ -489,7 +489,7 @@ public abstract class RateLimiter {
} }
private static void checkPermits(final int permits) { private static void checkPermits(final int permits) {
if(permits <= 0.0) { if (permits <= 0.0) {
throw new IllegalArgumentException( throw new IllegalArgumentException(
"Requested permits (" + permits + ") must be positive"); "Requested permits (" + permits + ") must be positive");
} }