Skip to content

Add null value support to MapBuilder#10829

Merged
artembilan merged 4 commits intospring-projects:mainfrom
cppwfs:SI-10827
Feb 20, 2026
Merged

Add null value support to MapBuilder#10829
artembilan merged 4 commits intospring-projects:mainfrom
cppwfs:SI-10827

Conversation

@cppwfs
Copy link
Copy Markdown
Contributor

@cppwfs cppwfs commented Feb 19, 2026

  • Add null value support to StaticHeaderValueMessageProcessor

Fixes: #10827

Auto-cherry-pick to 7.0.x

@cppwfs cppwfs added this to the 7.1.0-M3 milestone Feb 19, 2026
@cppwfs cppwfs requested a review from artembilan February 19, 2026 17:29
- Add null value support to  StaticHeaderValueMessageProcessor

Fixes: spring-projects#10827

**Auto-cherry-pick to `7.0.x`**
Copy link
Copy Markdown
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

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

I think the HeaderEnricherSpec API is missing from this change.
I believe that its public HeaderEnricherSpec headers(MapBuilder<?, String, Object> headers) { should be null-aware according to the expectations of this change.
And so on down to the individual entries:

	public <V> HeaderEnricherSpec header(String name, @Nullable V value, @Nullable Boolean overwrite) {
		AbstractHeaderValueMessageProcessor<V> headerValueMessageProcessor =
				new StaticHeaderValueMessageProcessor<>(value);
		headerValueMessageProcessor.setOverwrite(overwrite);
		return header(name, headerValueMessageProcessor);
	}

That's where the power of the nullability on the StaticHeaderValueMessageProcessor would be triggered.

*
* @author Mark Fisher
* @author Artem Bilan
* @author Glenn Renfro
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry, but looks like this is only change in the class 😄

@cppwfs cppwfs removed this from the 7.1.0-M3 milestone Feb 20, 2026
@artembilan artembilan merged commit 25871f2 into spring-projects:main Feb 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revise Nullability for the HeaderEnricher API

2 participants