Skip to content

Code review sweep (run 24947827165)#18305

Merged
trask merged 2 commits into
mainfrom
otelbot/code-review-sweep-24947827165
Apr 26, 2026
Merged

Code review sweep (run 24947827165)#18305
trask merged 2 commits into
mainfrom
otelbot/code-review-sweep-24947827165

Conversation

@otelbot
Copy link
Copy Markdown
Contributor

@otelbot otelbot Bot commented Apr 26, 2026

Automated code review sweep walked the following modules in order
and stopped after accumulating at least 10 modified files:

  • aws-sdk-1.11:library-autoconfigure
  • aws-sdk-1.11:testing

Module: aws-sdk-1.11:library-autoconfigure

Module path: instrumentation/aws-sdk/aws-sdk-1.11/library-autoconfigure

Summary

Applied 3 safe review fixes under instrumentation/aws-sdk/aws-sdk-1.11/library-autoconfigure: one RequestHandler2 field-naming cleanup and two visibility tightenings on SQS test overrides. metadata.yaml config entries matched in-module usage, and the required :check, :check -PtestLatestDeps=true, and spotlessApply runs completed successfully.

Applied Changes

Style

File: TracingRequestHandler.java:26
Change: Renamed the static `RequestHandler2` collaborator field from `DELEGATE` to `delegate` and updated its call sites.
Reason: The style guide reserves uppercase field names for constants and stable identifiers; this field is a runtime-created collaborator, so lower camel case is the repository-preferred form.

File: SqsSuppressReceiveSpansTest.java:25
Change: Changed the `configureClient(...)` override from `public` to `protected`.
Reason: The style guide requires minimal necessary visibility, and the abstract base test declares `configureClient(...)` as `protected`.

File: SqsTracingTest.java:25
Change: Changed the `configureClient(...)` override from `public` to `protected`.
Reason: The style guide requires minimal necessary visibility, and the abstract base test declares `configureClient(...)` as `protected`.

Module: aws-sdk-1.11:testing

Module path: instrumentation/aws-sdk/aws-sdk-1.11/testing

Summary

Reviewed instrumentation/aws-sdk/aws-sdk-1.11/testing, validated the module metadata.yaml usage, and applied safe testing fixes by replacing broad throws Exception declarations with the specific throws ReflectiveOperationException where the checked failure path is only reflective access.

Applied Changes

Testing

File: AbstractBaseAwsClientTest.java:73
Change: Narrowed `assertRequestWithMockedResponse(...)` and `extractRequestHandlers(...)` from `throws Exception` to `throws ReflectiveOperationException`.
Reason: `testing-general-patterns.md` says test entry points should keep a single, specific checked exception, so the shared helper now exposes only the reflective failure it actually throws.

File: AbstractDynamoDbClientTest.java:44
Change: Changed `sendRequestWithMockedResponse()` to declare `throws ReflectiveOperationException` instead of `throws Exception`.
Reason: `testing-general-patterns.md` prefers the narrowest single checked exception on `@Test` methods instead of broad `throws Exception`.

File: AbstractEc2ClientTest.java:26
Change: Changed `sendRequestWithMockedResponse()` to declare `throws ReflectiveOperationException` instead of `throws Exception`.
Reason: `testing-general-patterns.md` prefers the narrowest single checked exception on `@Test` methods instead of broad `throws Exception`.

File: AbstractKinesisClientTest.java:35
Change: Changed `testSendRequestWithMockedResponse(...)` to declare `throws ReflectiveOperationException` instead of `throws Exception`.
Reason: `testing-general-patterns.md` prefers the narrowest single checked exception on `@ParameterizedTest` methods instead of broad `throws Exception`.

File: AbstractLambdaClientTest.java:167
Change: Changed `testSendRequestWithMockedResponse(...)` to declare `throws ReflectiveOperationException` instead of `throws Exception`.
Reason: `testing-general-patterns.md` prefers the narrowest single checked exception on `@ParameterizedTest` methods instead of broad `throws Exception`.

File: AbstractRdsClientTest.java:27
Change: Changed `sendRequestWithMockedResponse()` to declare `throws ReflectiveOperationException` instead of `throws Exception`.
Reason: `testing-general-patterns.md` prefers the narrowest single checked exception on `@Test` methods instead of broad `throws Exception`.

File: AbstractS3ClientTest.java:60
Change: Changed `testSendRequestWithMockedResponse(...)` to declare `throws ReflectiveOperationException` instead of `throws Exception`.
Reason: `testing-general-patterns.md` prefers the narrowest single checked exception on `@ParameterizedTest` methods instead of broad `throws Exception`.

File: AbstractSecretsManagerClientTest.java:33
Change: Changed the secrets manager `@Test` methods to declare `throws ReflectiveOperationException` instead of `throws Exception`.
Reason: `testing-general-patterns.md` prefers the narrowest single checked exception on `@Test` methods instead of broad `throws Exception`.

File: AbstractSnsClientTest.java:57
Change: Changed `testSendRequestWithMockedResponse(...)` to declare `throws ReflectiveOperationException` instead of `throws Exception`.
Reason: `testing-general-patterns.md` prefers the narrowest single checked exception on `@ParameterizedTest` methods instead of broad `throws Exception`.

File: AbstractStepFunctionsClientTest.java:38
Change: Changed `testSendRequestWithMockedResponse(...)` to declare `throws ReflectiveOperationException` instead of `throws Exception`.
Reason: `testing-general-patterns.md` prefers the narrowest single checked exception on `@ParameterizedTest` methods instead of broad `throws Exception`.


Download code review diagnostics

otelbot Bot added 2 commits April 26, 2026 04:10
Automated code review of instrumentation/aws-sdk/aws-sdk-1.11/library-autoconfigure.
Automated code review of instrumentation/aws-sdk/aws-sdk-1.11/testing.
@otelbot otelbot Bot requested a review from a team as a code owner April 26, 2026 04:23
@trask trask merged commit 3af91d2 into main Apr 26, 2026
99 checks passed
@trask trask deleted the otelbot/code-review-sweep-24947827165 branch April 26, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant