From 2b8feb7a6289e4c417ce84dcefa75bdf087e8359 Mon Sep 17 00:00:00 2001 From: Aftab Shaikh Date: Fri, 10 May 2024 21:59:46 +0530 Subject: [PATCH] GH-427: Fix indentation --- .../retry/annotation/Backoff.java | 7 +++--- .../backoff/BackOffPolicyBuilderTests.java | 25 ++++++++++--------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/springframework/retry/annotation/Backoff.java b/src/main/java/org/springframework/retry/annotation/Backoff.java index 702e4405..82c23cda 100644 --- a/src/main/java/org/springframework/retry/annotation/Backoff.java +++ b/src/main/java/org/springframework/retry/annotation/Backoff.java @@ -130,9 +130,10 @@ * Evaluates to a value. In the exponential case ({@link #multiplier()} > 1.0) set * this to true to have the backoff delays randomized, so that the maximum delay is * multiplier times the previous delay and the distribution is uniform between the two - * values. This expression is always evaluated during initialization. If the expression - * returns true then {@link org.springframework.retry.backoff.ExponentialRandomBackOffPolicy} - * is used else {@link org.springframework.retry.backoff.ExponentialBackOffPolicy} is used. + * values. This expression is always evaluated during initialization. If the + * expression returns true then + * {@link org.springframework.retry.backoff.ExponentialRandomBackOffPolicy} is used + * else {@link org.springframework.retry.backoff.ExponentialBackOffPolicy} is used. * @return the flag to signal randomization is required (default false) */ String randomExpression() default ""; diff --git a/src/test/java/org/springframework/retry/backoff/BackOffPolicyBuilderTests.java b/src/test/java/org/springframework/retry/backoff/BackOffPolicyBuilderTests.java index f643cf7f..3e06ffda 100644 --- a/src/test/java/org/springframework/retry/backoff/BackOffPolicyBuilderTests.java +++ b/src/test/java/org/springframework/retry/backoff/BackOffPolicyBuilderTests.java @@ -132,12 +132,12 @@ public void shouldCreateExponentialRandomBackOffWhenProvidedRandomSupplier() { public void shouldCreateExponentialRandomBackOffWithProvidedSuppliers() { Sleeper mockSleeper = mock(Sleeper.class); BackOffPolicy backOffPolicy = BackOffPolicyBuilder.newBuilder() - .delaySupplier(() -> 10000L) - .maxDelaySupplier(() -> 100000L) - .multiplierSupplier(() -> 10d) - .randomSupplier(() -> true) - .sleeper(mockSleeper) - .build(); + .delaySupplier(() -> 10000L) + .maxDelaySupplier(() -> 100000L) + .multiplierSupplier(() -> 10d) + .randomSupplier(() -> true) + .sleeper(mockSleeper) + .build(); assertThat(ExponentialRandomBackOffPolicy.class.isAssignableFrom(backOffPolicy.getClass())).isTrue(); ExponentialRandomBackOffPolicy policy = (ExponentialRandomBackOffPolicy) backOffPolicy; @@ -168,12 +168,12 @@ public void shouldCreateExponentialBackOffWhenProvidedRandomSupplier() { public void shouldCreateExponentialBackOffWithProvidedSuppliers() { Sleeper mockSleeper = mock(Sleeper.class); BackOffPolicy backOffPolicy = BackOffPolicyBuilder.newBuilder() - .delaySupplier(() -> 10000L) - .maxDelaySupplier(() -> 100000L) - .multiplierSupplier(() -> 10d) - .randomSupplier(() -> false) - .sleeper(mockSleeper) - .build(); + .delaySupplier(() -> 10000L) + .maxDelaySupplier(() -> 100000L) + .multiplierSupplier(() -> 10d) + .randomSupplier(() -> false) + .sleeper(mockSleeper) + .build(); assertThat(backOffPolicy instanceof ExponentialRandomBackOffPolicy).isFalse(); assertThat(ExponentialBackOffPolicy.class.isAssignableFrom(backOffPolicy.getClass())).isTrue(); @@ -182,4 +182,5 @@ public void shouldCreateExponentialBackOffWithProvidedSuppliers() { assertThat(policy.getMaxInterval()).isEqualTo(100000); assertThat(policy.getMultiplier()).isEqualTo(10); } + }