fix: Add nullability annotations and fix kotlin-stdlib transitive leak - #10979
Open
obabichevjb wants to merge 1 commit into
Open
fix: Add nullability annotations and fix kotlin-stdlib transitive leak#10979obabichevjb wants to merge 1 commit into
obabichevjb wants to merge 1 commit into
Conversation
RockteMQ-AI
approved these changes
Aug 27, 2026
RockteMQ-AI
left a comment
Contributor
There was a problem hiding this comment.
Summary
This PR adds @Nullable annotations to getter methods in Message.java that can legitimately return null, and excludes transitive kotlin-stdlib dependencies from opentelemetry-exporter-otlp to reduce dependency bloat.
Both changes look correct and well-scoped:
- The
@Nullableannotations accurately reflect the nullability contract of these getters (e.g.,getTags(),getKeys(),getTransactionId()can all return null) - The kotlin-stdlib exclusions prevent unnecessary transitive dependencies from leaking into the classpath
LGTM.
Automated review by github-manager-bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Issue(s) This PR Fixes
Brief Description
This PR contains two independent fixes:
@Nullableannotations on 7 getters inMessage.javathat can return null at runtime. The methods are declared as returning plainString/Mapwith no nullability metadata, which produces silent NPEs in Kotlin consumers and gives no warning in Java IDEs.Exclude leaked
kotlin-stdlibfrom theopentelemetry-exporter-otlpdependency chain. A pure-Java project depending onrocketmq-clienttransitively resolveskotlin-stdlibvia:opentelemetry-exporter-otlp→opentelemetry-exporter-sender-okhttp→okhttp→kotlin-stdlib-*. Upstream already wrotekotlin-stdlibexclusions for theokio-jvmedge; this extends them to cover the okhttp path, enforcing a constraint upstream already intended.