Remove redundant code comments for improved readability and maintainability
CI - Test, Publish and Release / run-tests (push) Successful in 18s
CI - Test, Publish and Release / create-release (push) Successful in 18s
CI - Test, Publish and Release / check-and-publish (push) Successful in 13s

This commit is contained in:
2026-06-15 07:24:59 +02:00
parent a0790400e2
commit 6de7e26f33
9 changed files with 6 additions and 35 deletions
@@ -46,9 +46,6 @@ public final class RateLimitConfig {
.sorted((a, c) -> Integer.compare(c.prefix.length(), a.prefix.length()))
.toList();
// Collect the distinct limiter instances once so the gate's periodic cleanup can iterate
// them. Identity-based de-duplication keeps a limiter shared across several rules from
// being cleaned multiple times per pass.
Set<RateLimiter> limiters = Collections.newSetFromMap(new IdentityHashMap<>());
if (globalRule != null) limiters.add(globalRule.limiter());
for (Rule r : exactPathRules.values()) limiters.add(r.limiter());
@@ -126,7 +126,6 @@ public final class RateLimitGate {
try {
limiter.cleanup(staleAfterNanos);
} catch (RuntimeException ignored) {
// Best-effort eviction; never let one limiter break the cleanup cycle.
}
}
}