Browse Source

Fix wrong nullability requirement

Closes gh-31611
5.3.x
Stéphane Nicoll 1 year ago
parent
commit
a6ab308cf4
  1. 2
      spring-messaging/src/main/java/org/springframework/messaging/support/MessageBuilder.java

2
spring-messaging/src/main/java/org/springframework/messaging/support/MessageBuilder.java

@ -200,7 +200,7 @@ public final class MessageBuilder<T> { @@ -200,7 +200,7 @@ public final class MessageBuilder<T> {
* @since 4.1
*/
@SuppressWarnings("unchecked")
public static <T> Message<T> createMessage(@Nullable T payload, MessageHeaders messageHeaders) {
public static <T> Message<T> createMessage(T payload, MessageHeaders messageHeaders) {
Assert.notNull(payload, "Payload must not be null");
Assert.notNull(messageHeaders, "MessageHeaders must not be null");
if (payload instanceof Throwable) {

Loading…
Cancel
Save