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 03b65547c9..7a1409442d 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 @@ -61,12 +61,6 @@ public class GenericMessage implements Message, Serializable { */ public GenericMessage(T payload, Map headers) { Assert.notNull(payload, "payload must not be null"); - if (headers == null) { - headers = new HashMap(); - } - else { - headers = new HashMap(headers); - } this.headers = new MessageHeaders(headers); this.payload = payload; }