-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Apply Nullability to spring-integration-jmx
module
#10166
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
Conversation
related to: spring-projects#10083 Signed-off-by: Jiandong Ma <[email protected]>
local build is green, please help me to re-trigger build process. |
.../src/main/java/org/springframework/integration/jmx/NotificationPublishingMessageHandler.java
Outdated
Show resolved
Hide resolved
...ain/java/org/springframework/integration/jmx/config/IntegrationMBeanExportConfiguration.java
Outdated
Show resolved
Hide resolved
...jmx/src/main/java/org/springframework/integration/monitor/IntegrationJmxAttributeSource.java
Show resolved
Hide resolved
@@ -57,7 +58,7 @@ public Object postProcessBeforeInitialization(Object bean, String beanName) thro | |||
@SuppressWarnings("unchecked") | |||
Collection<String> autoCreateChannelCandidatesNames = | |||
(Collection<String>) new DirectFieldAccessor(bean).getPropertyValue("channelNames"); | |||
this.siBeanNames.addAll(autoCreateChannelCandidatesNames); | |||
this.siBeanNames.addAll(Objects.requireNonNull(autoCreateChannelCandidatesNames)); |
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.
FYI: #10167
.../src/main/java/org/springframework/integration/jmx/NotificationPublishingMessageHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jiandong Ma <[email protected]>
@@ -138,7 +141,7 @@ public final void onInit() { | |||
|
|||
@Override | |||
protected void handleMessageInternal(Message<?> message) { | |||
this.delegate.publish(this.notificationMapper.fromMessage(message)); | |||
this.delegate.publish(Objects.requireNonNull(this.notificationMapper.fromMessage(message))); |
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.
I don't think we need this Objects.requireNonNull()
yet.
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.
I think that's enough.
I'm taking this locally for final review an merge.
Some clean might still be included.
Thank you!
Merged as: 0669e3a. I'll push some clean up a bit latter in the separate commit. Thank you again! |
Here is follow up: f0591f6 |
related to: #10083