Skip to content

Review fixes for rmi:bootstrap#17644

Open
otelbot[bot] wants to merge 2 commits intomainfrom
otelbot/code-review-rmi-bootstrap
Open

Review fixes for rmi:bootstrap#17644
otelbot[bot] wants to merge 2 commits intomainfrom
otelbot/code-review-rmi-bootstrap

Conversation

@otelbot
Copy link
Copy Markdown
Contributor

@otelbot otelbot bot commented Apr 7, 2026

Summary

Applied a safe review fix in rmi/bootstrap by renaming the exported ThreadLocalContext singleton field to canonical INSTANCE and updating the local RMI javaagent callers to use qualified ThreadLocalContext.INSTANCE access.

Applied Changes

Style

File: ThreadLocalContext.java:12
Change: Renamed the exported singleton field from THREAD_LOCAL_CONTEXT to INSTANCE.
Reason: The style guide and singleton guidance allow uppercase exported singleton fields only in canonical forms such as INSTANCE; THREAD_LOCAL_CONTEXT exposed a collaborator under a non-canonical constant-style name.

File: ContextDispatcher.java:8
Change: Updated the dispatcher to use ThreadLocalContext.INSTANCE with a normal class import instead of the old static field import.
Reason: This keeps the caller aligned with the canonical singleton rename and avoids Error Prone BadImport warnings for static-importing the commonly used name INSTANCE.

File: RemoteServerInstrumentation.java:8
Change: Updated the server instrumentation to call ThreadLocalContext.INSTANCE.getAndResetContext() via a normal class import.
Reason: This keeps the caller aligned with the canonical singleton rename and avoids Error Prone BadImport warnings for static-importing the commonly used name INSTANCE.


Download code review diagnostics

@otelbot otelbot bot requested a review from a team as a code owner April 7, 2026 01:41
otelbot bot and others added 2 commits April 7, 2026 11:33
Automated code review of instrumentation/rmi/bootstrap.
@trask trask force-pushed the otelbot/code-review-rmi-bootstrap branch from a809a11 to 7a062d3 Compare April 7, 2026 18:34
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