Skip to content

Code review sweep (run 25143427986)#18430

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

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

Conversation

@otelbot

@otelbot otelbot Bot commented Apr 30, 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:

  • guava-10.0:javaagent
  • guava-10.0:library
  • gwt-2.0:javaagent
  • helidon-4.3:javaagent
  • helidon-4.3:library
  • helidon-4.3:testing
  • hibernate-3.3:javaagent
  • hibernate-4.0:javaagent

Module: guava-10.0:javaagent

Module path: instrumentation/guava-10.0/javaagent

Summary

Applied and committed safe review fixes for guava-10.0 javaagent: corrected nullable contracts in ByteBuddy advice and aligned the experimental test flag constant with repository test guidance.

Applied Changes

Nullability

File: GuavaListenableFutureInstrumentation.java:52
Change: Added `@Nullable` to `addListenerEnter()` and to `@Advice.Enter` / `@Advice.Thrown` parameters in `addListenerExit()`.
Reason: Repository nullability guidance requires `@Nullable` where values can actually be absent; `addListenerEnter()` returns `null`, `@Advice.Enter` receives that `null`, and `@Advice.Thrown` is `null` on successful exits.

Testing

File: BaseGuavaWithSpanTest.java:17
Change: Renamed the experimental flag field to private `EXPERIMENTAL_ATTRIBUTES` and updated its accessor use.
Reason: Experimental test flag guidance says module-specific experimental span attribute flags should be read once into a private static final `EXPERIMENTAL_ATTRIBUTES` constant.

Module: guava-10.0:library

Module path: instrumentation/guava-10.0/library

Summary

No safe repository-guideline fixes were applied for instrumentation/guava-10.0/library; the tracked build.gradle.kts, main sources, and tests matched the loaded style, library, testing, Gradle, and metadata.yaml guidance.

Applied Changes

No safe automated changes were applied.

Module: gwt-2.0:javaagent

Module path: instrumentation/gwt-2.0/javaagent

Summary

Applied and committed one safe repository-guideline fix for gwt-2.0 javaagent test-task configuration.

Applied Changes

Build

File: build.gradle.kts:106
Change: Moved the default test-task `jvmArgs`, `collectMetadata`, and `testcontainersBuildService` configuration from `tasks.withType<Test>().configureEach` into the existing `test` block.
Reason: `gradle-conventions.md` says single-test-task modules should use `tasks.test`; `withType<Test>().configureEach` is reserved for modules that explicitly register additional `Test` tasks, and existing `collectMetadata` should be configured on `tasks.test` in this case.

Module: helidon-4.3:javaagent

Module path: instrumentation/helidon-4.3/javaagent

Summary

Applied safe repository-guideline fixes in instrumentation/helidon-4.3/javaagent and committed them in 3ced831d.

Applied Changes

Performance

File: HelidonServerResponseMutator.java:12
Change: Added a package-local `INSTANCE` singleton and private constructor for the stateless `HelidonServerResponseMutator`.
Reason: Repository review guidance says stateless telemetry helpers used on hot paths should avoid per-request allocation; keeping a singleton on hot paths is the documented exception to the general instance-creation preference.

File: ResponseCustomizingFilter.java:24
Change: Reused `HelidonServerResponseMutator.INSTANCE` instead of creating `new HelidonServerResponseMutator()` during response customization.
Reason: The `Filter.filter(...)` method runs on the request path, and repository performance guidance says to avoid avoidable hot-path allocations for stateless telemetry interface implementations.

Module: helidon-4.3:library

Module path: instrumentation/helidon-4.3/library

Summary

No safe repository-guideline fixes were needed for instrumentation/helidon-4.3/library. Reviewable source, test, Gradle, and required metadata.yaml checks did not reveal deterministic issues to change.

Applied Changes

No safe automated changes were applied.

Module: helidon-4.3:testing

Module path: instrumentation/helidon-4.3/testing

Summary

No safe repository-guideline fixes were applied under instrumentation/helidon-4.3/testing; the review found no deterministic issues in the reviewable source or Gradle files.

Applied Changes

No safe automated changes were applied.

Module: hibernate-3.3:javaagent

Module path: instrumentation/hibernate/hibernate-3.3/javaagent

Summary

Applied one safe repository-guideline fix in hibernate-3.3 javaagent test code.

Applied Changes

Style

File: SessionTest.java:140
Change: Renamed the unused caught `RuntimeException` variable from `e` to `ignored`.
Reason: Repository catch-variable naming guidance prefers `ignored` for intentionally unused catch parameters.

Module: hibernate-4.0:javaagent

Module path: instrumentation/hibernate/hibernate-4.0/javaagent

Summary

Applied and committed safe review fixes for hibernate-4.0 javaagent advice nullability. Validation completed with :instrumentation:hibernate:hibernate-4.0:javaagent:check, :instrumentation:hibernate:hibernate-4.0:javaagent:check -PtestLatestDeps=true, and final spotlessApply.

Applied Changes

Nullability

File: CriteriaInstrumentation.java:50
Change: Added `@Nullable` to the `startMethod()` advice return and to nullable `@Advice.Thrown` / `@Advice.Enter` exit parameters.
Reason: Repository nullability guidance requires annotating values that can be `null`; `HibernateOperationScope.start(...)` can return `null`, and javaagent advice patterns model thrown and enter-scope values as nullable on exit advice.

File: QueryInstrumentation.java:50
Change: Added `@Nullable` to the `startMethod()` advice return and to nullable `@Advice.Thrown` / `@Advice.Enter` exit parameters.
Reason: Repository nullability guidance requires annotating values that can be `null`; `HibernateOperationScope.start(...)` can return `null`, and javaagent advice patterns model thrown and enter-scope values as nullable on exit advice.

File: SessionInstrumentation.java:97
Change: Added `@Nullable` to the `startMethod()` advice return and to nullable `@Advice.Thrown` / `@Advice.Enter` exit parameters.
Reason: Repository nullability guidance requires annotating values that can be `null`; `HibernateOperationScope.start(...)` can return `null`, and javaagent advice patterns model thrown and enter-scope values as nullable on exit advice.

File: TransactionInstrumentation.java:49
Change: Added `@Nullable` to the `startCommit()` advice return and to nullable `@Advice.Thrown` / `@Advice.Enter` exit parameters.
Reason: Repository nullability guidance requires annotating values that can be `null`; `HibernateOperationScope.start(...)` can return `null`, and javaagent advice patterns model thrown and enter-scope values as nullable on exit advice.


Download code review diagnostics

otelbot Bot added 5 commits April 30, 2026 02:30
Automated code review of instrumentation/guava-10.0/javaagent.
Automated code review of instrumentation/gwt-2.0/javaagent.
Automated code review of instrumentation/helidon-4.3/javaagent.
Automated code review of instrumentation/hibernate/hibernate-3.3/javaagent.
Automated code review of instrumentation/hibernate/hibernate-4.0/javaagent.
@otelbot otelbot Bot requested a review from a team as a code owner April 30, 2026 02:49
@trask trask closed this Apr 30, 2026
@trask trask reopened this Apr 30, 2026
@trask trask merged commit 6b59b08 into main Apr 30, 2026
187 of 274 checks passed
@trask trask deleted the otelbot/code-review-sweep-25143427986 branch April 30, 2026 04:46
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