Skip to content

Commit 8917821

Browse files
committed
Polish GenericMessage
1 parent bafc73f commit 8917821

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

spring-messaging/src/main/java/org/springframework/messaging/support/GenericMessage.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@
3131
*
3232
* @author Mark Fisher
3333
* @since 4.0
34+
*
3435
* @see MessageBuilder
3536
*/
3637
public class GenericMessage<T> implements Message<T>, Serializable {
3738

38-
private static final long serialVersionUID = -9004496725833093406L;
39+
private static final long serialVersionUID = 4268801052358035098L;
3940

4041

4142
private final T payload;
@@ -48,19 +49,19 @@ public class GenericMessage<T> implements Message<T>, Serializable {
4849
*
4950
* @param payload the message payload
5051
*/
51-
protected GenericMessage(T payload) {
52+
public GenericMessage(T payload) {
5253
this(payload, null);
5354
}
5455

5556
/**
56-
* Create a new message with the given payload. The provided map
57-
* will be used to populate the message headers
57+
* Create a new message with the given payload. The provided map will be used to
58+
* populate the message headers
5859
*
5960
* @param payload the message payload
6061
* @param headers message headers
6162
* @see MessageHeaders
6263
*/
63-
protected GenericMessage(T payload, Map<String, Object> headers) {
64+
public GenericMessage(T payload, Map<String, Object> headers) {
6465
Assert.notNull(payload, "payload must not be null");
6566
if (headers == null) {
6667
headers = new HashMap<String, Object>();

0 commit comments

Comments
 (0)