INT-3470: SF 4.1 Compatibility #2

JIRA: https://jira.spring.io/browse/INT-3470

* Apply the last `ChannelInterceptor` changes - just `extends ChannelInterceptorAdapter`
* Change some tests to check content according to the new changes to the `GenericMessage#toString()`

**Cherry-pick to 4.0.x**
This commit is contained in:
Artem Bilan
2014-07-14 14:52:36 +03:00
committed by Gary Russell
parent e8898821ae
commit f0eeb3b2b9
6 changed files with 16 additions and 14 deletions

View File

@@ -52,6 +52,7 @@ import org.springframework.jms.core.MessageCreator;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.support.ChannelInterceptor;
import org.springframework.messaging.support.ChannelInterceptorAdapter;
import org.springframework.messaging.support.GenericMessage;
/**
@@ -266,8 +267,10 @@ public class PollableJmsChannelTests {
assertEquals("bar", result2.getPayload());
}
public static class SampleInterceptor implements ChannelInterceptor {
public static class SampleInterceptor extends ChannelInterceptorAdapter {
private final boolean preReceiveFlag;
public SampleInterceptor(boolean preReceiveFlag){
this.preReceiveFlag = preReceiveFlag;
}