Closed
Description
Artem Bilan opened SPR-14468 and commented
The test-case to reproduce:
@Test
public void testRemoveEvenIfNull() {
Message<?> message = new GenericMessage<>("payload", Collections.singletonMap("foo", null));
MessageHeaderAccessor accessor = new MessageHeaderAccessor(message);
accessor.removeHeader("foo");
Map<String, Object> headers = accessor.toMap();
assertFalse(headers.containsKey("foo"));
}
The workaround is only to extract a target Map
and remove from there, and build a new Message
.
But that doesn't help for Spring Integration's HeaderFilter
to work properly.
Affects: 4.2.7, 4.3.1
Backported to: 4.2.8