-
Notifications
You must be signed in to change notification settings - Fork 12k
[ISSUE #10978] Add Nullable annotations to nullable Message getters and stop kotlin-stdlib transitive leak #11155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ | |
| import java.util.Collection; | ||
| import java.util.HashMap; | ||
| import java.util.Map; | ||
| import javax.annotation.Nullable; | ||
|
|
||
| public class Message implements Serializable { | ||
| private static final long serialVersionUID = 8445773977080406428L; | ||
|
|
@@ -98,10 +99,12 @@ public void putUserProperty(final String name, final String value) { | |
| this.putProperty(name, value); | ||
| } | ||
|
|
||
| @Nullable | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Info] The One minor note: |
||
| public String getUserProperty(final String name) { | ||
| return this.getProperty(name); | ||
| } | ||
|
|
||
| @Nullable | ||
| public String getProperty(final String name) { | ||
| if (null == this.properties) { | ||
| this.properties = new HashMap<>(); | ||
|
|
@@ -125,6 +128,7 @@ public void setTopic(String topic) { | |
| this.topic = topic; | ||
| } | ||
|
|
||
| @Nullable | ||
| public String getTags() { | ||
| return this.getProperty(MessageConst.PROPERTY_TAGS); | ||
| } | ||
|
|
@@ -133,6 +137,7 @@ public void setTags(String tags) { | |
| this.putProperty(MessageConst.PROPERTY_TAGS, tags); | ||
| } | ||
|
|
||
| @Nullable | ||
| public String getKeys() { | ||
| return this.getProperty(MessageConst.PROPERTY_KEYS); | ||
| } | ||
|
|
@@ -200,6 +205,7 @@ public void setBody(byte[] body) { | |
| this.body = body; | ||
| } | ||
|
|
||
| @Nullable | ||
| public Map<String, String> getProperties() { | ||
| return properties; | ||
| } | ||
|
|
@@ -208,6 +214,7 @@ void setProperties(Map<String, String> properties) { | |
| this.properties = properties; | ||
| } | ||
|
|
||
| @Nullable | ||
| public String getBuyerId() { | ||
| return getProperty(MessageConst.PROPERTY_BUYER_ID); | ||
| } | ||
|
|
@@ -216,6 +223,7 @@ public void setBuyerId(String buyerId) { | |
| putProperty(MessageConst.PROPERTY_BUYER_ID, buyerId); | ||
| } | ||
|
|
||
| @Nullable | ||
| public String getTransactionId() { | ||
| return transactionId; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Info] The okhttp exclusion is well-targeted. Since RocketMQ uses the gRPC exporter (
opentelemetry-exporter-otlpwith gRPC transport), the HTTP sender (okhttp) is unused and was pullingkotlin-stdlibtransitively into pure-Java consumers.This mirrors the existing
okio-jvmexclusion pattern in the root pom and keeps the dependency tree clean for Java-only deployments.