Why this matters
Improves readability and centralizes changes.
Replace numeric/string literals with named constants to document meaning.
Improves readability and centralizes changes.
Side-by-side examples engineers can pattern-match during review.
Thread.sleep(2000);private static final int RETRY_DELAY_MS = 2000;
Thread.sleep(RETRY_DELAY_MS);if (retries > 3)if (retries > MAX_RETRIES)From the same buckets as this rule.