From 8917821e9588682babc5bd4615e6f0c121ae464b Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 21 Oct 2013 16:29:01 -0400 Subject: [PATCH] Polish GenericMessage --- .../messaging/support/GenericMessage.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spring-messaging/src/main/java/org/springframework/messaging/support/GenericMessage.java b/spring-messaging/src/main/java/org/springframework/messaging/support/GenericMessage.java index c5186d8351..c0b9873440 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/support/GenericMessage.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/support/GenericMessage.java @@ -31,11 +31,12 @@ import org.springframework.util.ObjectUtils; * * @author Mark Fisher * @since 4.0 + * * @see MessageBuilder */ public class GenericMessage implements Message, Serializable { - private static final long serialVersionUID = -9004496725833093406L; + private static final long serialVersionUID = 4268801052358035098L; private final T payload; @@ -48,19 +49,19 @@ public class GenericMessage implements Message, Serializable { * * @param payload the message payload */ - protected GenericMessage(T payload) { + public GenericMessage(T payload) { this(payload, null); } /** - * Create a new message with the given payload. The provided map - * will be used to populate the message headers + * Create a new message with the given payload. The provided map will be used to + * populate the message headers * * @param payload the message payload * @param headers message headers * @see MessageHeaders */ - protected GenericMessage(T payload, Map headers) { + public GenericMessage(T payload, Map headers) { Assert.notNull(payload, "payload must not be null"); if (headers == null) { headers = new HashMap();