Skip to content

Commit a58d743

Browse files
committed
Fix checkstyle and add some more validation
1 parent 4f121e6 commit a58d743

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/retries/src/main/java/software/amazon/awssdk/retries/internal/DefaultLegacyRetryStrategy.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import software.amazon.awssdk.retries.api.RefreshRetryTokenRequest;
2424
import software.amazon.awssdk.retries.internal.circuitbreaker.TokenBucketStore;
2525
import software.amazon.awssdk.utils.Logger;
26+
import software.amazon.awssdk.utils.Validate;
2627

2728
@SdkInternalApi
2829
public final class DefaultLegacyRetryStrategy
@@ -34,9 +35,9 @@ public final class DefaultLegacyRetryStrategy
3435

3536
DefaultLegacyRetryStrategy(Builder builder) {
3637
super(LOG, builder);
37-
this.throttlingExceptionCost = builder.throttlingExceptionCost;
38-
this.throttlingBackoffStrategy = builder.throttlingBackoffStrategy;
39-
this.treatAsThrottling = builder.treatAsThrottling;
38+
this.throttlingExceptionCost = Validate.paramNotNull(builder.throttlingExceptionCost, "throttlingExceptionCost");
39+
this.throttlingBackoffStrategy = Validate.paramNotNull(builder.throttlingBackoffStrategy, "throttlingBackoffStrategy");
40+
this.treatAsThrottling = Validate.paramNotNull(builder.treatAsThrottling, "treatAsThrottling");
4041
}
4142

4243
@Override

core/sdk-core/src/main/java/software/amazon/awssdk/core/retry/RetryPolicy.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
package software.amazon.awssdk.core.retry;
1717

18-
import java.time.Duration;
1918
import java.util.Objects;
2019
import software.amazon.awssdk.annotations.Immutable;
2120
import software.amazon.awssdk.annotations.SdkPublicApi;

0 commit comments

Comments
 (0)