Skip to content

Code review sweep (run 25084109220)#18393

Merged
trask merged 5 commits into
mainfrom
otelbot/code-review-sweep-25084109220
Apr 29, 2026
Merged

Code review sweep (run 25084109220)#18393
trask merged 5 commits into
mainfrom
otelbot/code-review-sweep-25084109220

Conversation

@otelbot

@otelbot otelbot Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

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

  • spring-integration-4.1:testing
  • spring-jms-2.0:javaagent
  • spring-jms-2.0:testing
  • spring-jms-6.0:javaagent

Module: spring-integration-4.1:testing

Module path: instrumentation/spring/spring-integration-4.1/testing

Summary

Applied safe visibility fixes in spring-integration-4.1 testing helpers and committed them as 94654116.

Applied Changes

Style

File: AbstractComplexPropagationTest.java:36
Change: Changed `AbstractComplexPropagationTest`, its constructor, and its `testing` field from public/protected visibility to package-private/private visibility.
Reason: The style guide requires minimal necessary visibility, and test classes should be package-private; sibling usages are same-package tests, so wider visibility was unnecessary.

File: AbstractSpringCloudStreamProducerTest.java:15
Change: Changed `AbstractSpringCloudStreamProducerTest`, its constructor, and its `testing` field from public/protected visibility to package-private/private visibility.
Reason: The style guide requires minimal necessary visibility, and test classes should be package-private; sibling usages are same-package tests, so wider visibility was unnecessary.

File: AbstractSpringCloudStreamRabbitTest.java:13
Change: Changed `AbstractSpringCloudStreamRabbitTest`, its constructor, and its `testing` field from public/protected visibility to package-private/private visibility.
Reason: The style guide requires minimal necessary visibility, and test classes should be package-private; sibling usages are same-package tests, so wider visibility was unnecessary.

File: AbstractSpringIntegrationTracingTest.java:40
Change: Changed the `testing` field from protected to private visibility.
Reason: The style guide requires minimal necessary visibility; the field is only used inside `AbstractSpringIntegrationTracingTest`.

File: RabbitExtension.java:32
Change: Changed `RabbitExtension`, its constructor, and `getBean(...)` from public visibility to package-private visibility.
Reason: The style guide requires minimal necessary visibility; repository sibling usage is limited to same-package tests and helpers.

Module: spring-jms-2.0:javaagent

Module path: instrumentation/spring/spring-jms/spring-jms-2.0/javaagent

Summary

Applied and committed two safe review fixes for spring-jms-2.0 javaagent.

Applied Changes

Build

File: build.gradle.kts:69
Change: Added `metadataConfig` to the default `test` task for the non-default `otel.instrumentation.messaging.experimental.receive-telemetry.enabled=true` JVM mode.
Reason: `gradle-conventions.md` requires `metadataConfig` to describe non-default test configuration when metadata collection is present.

Style

File: SpringTemplateTest.java:60
Change: Renamed constant-like static final field `messageText` to `MESSAGE_TEXT` and updated usages.
Reason: The repository style guide requires `SCREAMING_SNAKE_CASE` for constant-like immutable value fields.

Module: spring-jms-2.0:testing

Module path: instrumentation/spring/spring-jms/spring-jms-2.0/testing

Summary

Applied one safe repository-guideline fix in spring-jms-2.0:testing and committed it as a562ddc.

Applied Changes

Style

File: AbstractJmsTest.java:66
Change: Added `@Nullable` to `assertConsumerSpan(...)` parameters `producer`, `parent`, and `msgId`, and to `consumerAttributeAssertions(...)` parameter `msgId`.
Reason: Repository nullability guidance requires `@Nullable` when callers concretely pass `null`; Spring JMS javaagent tests pass `null` for these helper parameters.

Module: spring-jms-6.0:javaagent

Module path: instrumentation/spring/spring-jms/spring-jms-6.0/javaagent

Summary

Applied safe repository-guideline fixes for spring-jms-6.0 javaagent and committed them in ceec779a.

Applied Changes

Build

File: build.gradle.kts:25
Change: Added sibling `testInstrumentation` for `:instrumentation:spring:spring-jms:spring-jms-2.0:javaagent` and added `metadataConfig` for the receive-telemetry test mode.
Reason: `gradle-conventions.md` requires javaagent version siblings to be listed via `testInstrumentation`, and existing non-default test JVM args must have matching `metadataConfig` when metadata collection is wired.

Testing

File: AbstractSpringJmsListenerTest.java:60
Change: Collapsed the `@ParameterizedTest` multi-exception `throws` clause to a single `throws Exception` and removed now-unused exception imports.
Reason: `testing-general-patterns.md` requires JUnit test entry points to use a single exception type; the timeout-based `CompletableFuture.get(...)` path exposes multiple checked exceptions without a cleaner narrow single type.

File: SpringJmsListenerTest.java:86
Change: Collapsed the `@ParameterizedTest` multi-exception `throws` clause to a single `throws Exception` and removed now-unused exception imports.
Reason: `testing-general-patterns.md` requires JUnit test entry points to use a single exception type; the timeout-based `CompletableFuture.get(...)` path exposes multiple checked exceptions without a cleaner narrow single type.


Download code review diagnostics

otelbot Bot added 4 commits April 29, 2026 01:03
Automated code review of instrumentation/spring/spring-integration-4.1/testing.
Automated code review of instrumentation/spring/spring-jms/spring-jms-2.0/javaagent.
Automated code review of instrumentation/spring/spring-jms/spring-jms-2.0/testing.
Automated code review of instrumentation/spring/spring-jms/spring-jms-6.0/javaagent.
@otelbot otelbot Bot requested a review from a team as a code owner April 29, 2026 01:15
Abstract test bases were made package-private in the prior review-fix

commit, leaving no public/protected classes for javadoc to document,

which fails the javadoc task. Other testing modules with the same

issue (e.g., iceberg-1.8:testing) disable javadoc; do the same here.
@trask trask merged commit e092a2e into main Apr 29, 2026
94 checks passed
@trask trask deleted the otelbot/code-review-sweep-25084109220 branch April 29, 2026 03:17
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