diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/gateway/DefaultMessageMapper.java b/org.springframework.integration/src/main/java/org/springframework/integration/gateway/DefaultMessageMapper.java index 2a7fce2bdb..9174d896e0 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/gateway/DefaultMessageMapper.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/gateway/DefaultMessageMapper.java @@ -24,7 +24,7 @@ import org.springframework.integration.message.MessageBuilder; * * @author Mark Fisher */ -public class DefaultMessageMapper implements MessageMapper { +public class DefaultMessageMapper implements MessageMapper { /** * Returns the Message payload (or null if the Message is null). diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/gateway/MessageMapper.java b/org.springframework.integration/src/main/java/org/springframework/integration/gateway/MessageMapper.java index 31b9d48ffc..03f6c1969d 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/gateway/MessageMapper.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/gateway/MessageMapper.java @@ -23,10 +23,10 @@ import org.springframework.integration.message.Message; * * @author Mark Fisher */ -public interface MessageMapper { +public interface MessageMapper { - Message toMessage(Object object); + Message toMessage(T object); - Object fromMessage(Message message); + T fromMessage(Message message); } diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/gateway/SimpleMessagingGateway.java b/org.springframework.integration/src/main/java/org/springframework/integration/gateway/SimpleMessagingGateway.java index 9a352d6e63..0e62c43a02 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/gateway/SimpleMessagingGateway.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/gateway/SimpleMessagingGateway.java @@ -32,7 +32,7 @@ public class SimpleMessagingGateway extends AbstractMessagingGateway { private volatile MessageMapper messageMapper = new DefaultMessageMapper(); - public void setMessageMapper(MessageMapper messageMapper) { + public void setMessageMapper(MessageMapper messageMapper) { Assert.notNull(messageMapper, "messageMapper must not be null"); this.messageMapper = (messageMapper != null) ? messageMapper : new DefaultMessageMapper(); diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/gateway/config/TestMessageMapper.java b/org.springframework.integration/src/test/java/org/springframework/integration/gateway/config/TestMessageMapper.java index 628b9ba06b..b216bff50d 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/gateway/config/TestMessageMapper.java +++ b/org.springframework.integration/src/test/java/org/springframework/integration/gateway/config/TestMessageMapper.java @@ -23,13 +23,13 @@ import org.springframework.integration.message.StringMessage; /** * @author Mark Fisher */ -public class TestMessageMapper implements MessageMapper { +public class TestMessageMapper implements MessageMapper { - public Message toMessage(Object object) { + public Message toMessage(String object) { return new StringMessage("pre." + object); } - public Object fromMessage(Message message) { + public String fromMessage(Message message) { return message.getPayload().toString() + ".post"; }