Skip to content

Conversation

mjd507
Copy link
Contributor

@mjd507 mjd507 commented Aug 24, 2025

related to: #10083

mjd507 added 2 commits August 24, 2025 22:28
related to: spring-projects#10083

Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com>
Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com>
@@ -68,17 +67,18 @@ public abstract class MessageProducerSupport extends AbstractEndpoint
@Nullable
private MessageReceiverObservationConvention observationConvention;

@SuppressWarnings("NullAway.Init")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this one is @Nullable as well.
See getOutputChannel() contact.
And then getRequiredOutputChannel()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.
I did this due to I found below lifecycle method in this class.

	@Override
	public void afterSingletonsInstantiated() {
		Assert.state(this.outputChannel != null || StringUtils.hasText(this.outputChannelName),
				"'outputChannel' or 'outputChannelName' is required");
	}

will it not be called in some cases?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be, but since that checks against one or another , both of them has to be treated equal. I guess getOutputChannel should do the trick.

mjd507 added 2 commits August 26, 2025 09:53
Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com>
@artembilan artembilan merged commit d2a7fed into spring-projects:main Aug 26, 2025
3 checks passed
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.

2 participants