-
Notifications
You must be signed in to change notification settings - Fork 1.1k
GH-10083: Apply Nullability to core events, leader, message and resource packages
#10320
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
Changes from 2 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 |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| /** | ||
| * ApplicationEvents generated by the Spring Integration framework. | ||
| */ | ||
| @org.jspecify.annotations.NullMarked | ||
| package org.springframework.integration.events; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| /** | ||
| * Temporary package until s-c-c-core is released. | ||
| */ | ||
| @org.jspecify.annotations.NullMarked | ||
| package org.springframework.integration.leader.event; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| /** | ||
| * Temporary package until s-c-c-core is released. | ||
| */ | ||
| @org.springframework.lang.NonNullApi | ||
| @org.jspecify.annotations.NullMarked | ||
| package org.springframework.integration.leader; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| /** | ||
| * Provides concrete {@link org.springframework.messaging.Message} implementations. | ||
| */ | ||
| @org.jspecify.annotations.NullMarked | ||
| package org.springframework.integration.message; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,6 +75,7 @@ | |
| import org.springframework.integration.store.MessageMetadata; | ||
| import org.springframework.integration.store.MessageStore; | ||
| import org.springframework.integration.store.SimpleMessageGroup; | ||
| import org.springframework.integration.support.MessageBuilder; | ||
| import org.springframework.integration.support.MutableMessage; | ||
| import org.springframework.integration.support.MutableMessageBuilder; | ||
| import org.springframework.integration.support.converter.AllowListDeserializingConverter; | ||
|
|
@@ -837,6 +838,9 @@ public AdviceMessage<?> convert(Document source) { | |
| throw new IllegalStateException("failed to load class: " + inputMessageType, e); | ||
| } | ||
| } | ||
| else { | ||
| inputMessage = MessageBuilder.withPayload(new byte[0]).build(); | ||
|
||
| } | ||
|
|
||
| AdviceMessage<?> message = new AdviceMessage<>( | ||
| MongoDbMessageStore.this.converter.extractPayload(source), headers, inputMessage); | ||
|
|
||
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.
... and remove
volatileon all the properties.It is really an anti-pattern to change state of the component at runtime.
Therefore, we treat all of them as state fixed after initialization phase.
Therefore, no need in extra ticks over
volatilebarrier.