We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
BaseMessageBuilder
1 parent f87aff3 commit bd067daCopy full SHA for bd067da
spring-integration-core/src/main/java/org/springframework/integration/support/BaseMessageBuilder.java
@@ -310,10 +310,10 @@ public Message<T> build() {
310
311
return this.originalMessage;
312
}
313
- if (payload instanceof Throwable throwable) {
314
- return (Message<T>) new ErrorMessage(throwable, getHeaders());
+ if (this.payload instanceof Throwable throwable) {
+ return (Message<T>) new ErrorMessage(throwable, this.headerAccessor.toMap());
315
316
- return new GenericMessage<>(payload, getHeaders());
+ return new GenericMessage<>(this.payload, this.headerAccessor.toMap());
317
318
319
private boolean containsReadOnly(MessageHeaders headers) {
0 commit comments