Skip to content

Commit d26f697

Browse files
committed
checkstyle fix
1 parent ea0f232 commit d26f697

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

core/sdk-core/src/main/java/software/amazon/awssdk/core/interceptor/ExecutionInterceptorChain.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import software.amazon.awssdk.core.SdkRequest;
2525
import software.amazon.awssdk.core.SdkResponse;
2626
import software.amazon.awssdk.core.async.AsyncRequestBody;
27-
import software.amazon.awssdk.core.internal.interceptor.DefaultFailedExecutionContext;
2827
import software.amazon.awssdk.core.sync.RequestBody;
2928
import software.amazon.awssdk.http.SdkHttpFullRequest;
3029
import software.amazon.awssdk.http.SdkHttpRequest;

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/AsyncExecutionFailureExceptionReportingStage.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@
2222
import software.amazon.awssdk.annotations.SdkInternalApi;
2323
import software.amazon.awssdk.core.internal.http.RequestExecutionContext;
2424
import software.amazon.awssdk.core.internal.http.pipeline.RequestPipeline;
25-
import software.amazon.awssdk.core.internal.interceptor.DefaultFailedExecutionContext;
2625
import software.amazon.awssdk.core.internal.util.ThrowableUtils;
2726
import software.amazon.awssdk.http.SdkHttpFullRequest;
2827
import software.amazon.awssdk.utils.CompletableFutureUtils;
29-
import software.amazon.awssdk.utils.Logger;
3028

3129
@SdkInternalApi
3230
public final class AsyncExecutionFailureExceptionReportingStage<OutputT>

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/ExecutionFailureExceptionReportingStage.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@
1616
package software.amazon.awssdk.core.internal.http.pipeline.stages;
1717

1818
import static software.amazon.awssdk.core.internal.http.pipeline.stages.utils.ExceptionReportingUtils.reportFailureToInterceptors;
19+
import static software.amazon.awssdk.core.internal.util.ThrowableUtils.failure;
1920

2021
import software.amazon.awssdk.annotations.SdkInternalApi;
2122
import software.amazon.awssdk.core.internal.http.RequestExecutionContext;
2223
import software.amazon.awssdk.core.internal.http.pipeline.RequestPipeline;
2324
import software.amazon.awssdk.http.SdkHttpFullRequest;
24-
import software.amazon.awssdk.utils.Logger;
2525

2626
@SdkInternalApi
2727
public final class ExecutionFailureExceptionReportingStage<OutputT> implements RequestPipeline<SdkHttpFullRequest, OutputT> {
28-
private static final Logger log = Logger.loggerFor(ExecutionFailureExceptionReportingStage.class);
2928
private final RequestPipeline<SdkHttpFullRequest, OutputT> wrapped;
3029

3130
public ExecutionFailureExceptionReportingStage(RequestPipeline<SdkHttpFullRequest, OutputT> wrapped) {
@@ -38,7 +37,7 @@ public OutputT execute(SdkHttpFullRequest input, RequestExecutionContext context
3837
return wrapped.execute(input, context);
3938
} catch (Exception e) {
4039
Throwable throwable = reportFailureToInterceptors(context, e);
41-
throw (Exception) throwable;
40+
throw failure(throwable);
4241
}
4342
}
4443
}

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/utils/ExceptionReportingUtils.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515

1616
package software.amazon.awssdk.core.internal.http.pipeline.stages.utils;
1717

18+
import software.amazon.awssdk.annotations.SdkInternalApi;
1819
import software.amazon.awssdk.core.internal.http.RequestExecutionContext;
1920
import software.amazon.awssdk.core.internal.interceptor.DefaultFailedExecutionContext;
2021
import software.amazon.awssdk.utils.Logger;
2122

23+
@SdkInternalApi
2224
public final class ExceptionReportingUtils {
2325
private static final Logger log = Logger.loggerFor(ExceptionReportingUtils.class);
2426

@@ -46,7 +48,9 @@ public static Throwable reportFailureToInterceptors(RequestExecutionContext cont
4648

4749
private static DefaultFailedExecutionContext runModifyException(RequestExecutionContext context, Throwable e) {
4850
DefaultFailedExecutionContext failedContext =
49-
DefaultFailedExecutionContext.builder().interceptorContext(context.executionContext().interceptorContext()).exception(e).build();
51+
DefaultFailedExecutionContext.builder()
52+
.interceptorContext(context.executionContext().interceptorContext())
53+
.exception(e).build();
5054
Throwable throwable = context.interceptorChain().modifyException(failedContext, context.executionAttributes());
5155

5256
return failedContext.toBuilder().applyMutation(b -> b.exception(throwable)).build();

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/interceptor/DefaultFailedExecutionContext.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
* An SDK-internal implementation of {@link Context.FailedExecution}.
3333
*/
3434
@SdkInternalApi
35-
public class DefaultFailedExecutionContext implements Context.FailedExecution, ToCopyableBuilder<DefaultFailedExecutionContext.Builder, DefaultFailedExecutionContext> {
35+
public class DefaultFailedExecutionContext implements Context.FailedExecution,
36+
ToCopyableBuilder<DefaultFailedExecutionContext.Builder,
37+
DefaultFailedExecutionContext> {
3638
private final InterceptorContext interceptorContext;
3739
private final Throwable exception;
3840

0 commit comments

Comments
 (0)