INT-1133 AbstractReplyProducingMessageHandler no longer copies headers from the request Message into the reply Message IF the return value from the handler implementation is already a Message instance.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,7 +20,6 @@ import java.util.concurrent.CountDownLatch;
|
||||
|
||||
import org.springframework.integration.annotation.ServiceActivator;
|
||||
import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.message.StringMessage;
|
||||
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
@@ -48,10 +47,10 @@ public class TestHandler {
|
||||
}
|
||||
|
||||
@ServiceActivator
|
||||
public Message<?> handle(Message<?> message) {
|
||||
public String handle(Message<?> message) {
|
||||
this.messageString = message.getPayload().toString();
|
||||
this.latch.countDown();
|
||||
return (this.replyMessageText != null) ? new StringMessage(this.replyMessageText) : null;
|
||||
return (this.replyMessageText != null) ? this.replyMessageText : null;
|
||||
}
|
||||
|
||||
public String getMessageString() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,7 +18,6 @@ package org.springframework.integration.filter;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@@ -51,7 +50,7 @@ public class MessageFilterTests {
|
||||
filter.handleMessage(message);
|
||||
Message<?> received = output.receive(0);
|
||||
assertEquals(message.getPayload(), received.getPayload());
|
||||
assertNotSame(message.getHeaders().getId(), received.getHeaders().getId());
|
||||
assertEquals(message.getHeaders().getId(), received.getHeaders().getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user