From a5dd0f0c09c779e5ea959c5b5fb0c998158188ca Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 4 Jul 2018 15:06:56 +0200 Subject: [PATCH] Fix accidental @Nullable declaration on addAttribute(Object) Issue: SPR-16831 --- .../main/java/org/springframework/ui/ConcurrentModel.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/ui/ConcurrentModel.java b/spring-context/src/main/java/org/springframework/ui/ConcurrentModel.java index 5589a2944c1..22edddf0257 100644 --- a/spring-context/src/main/java/org/springframework/ui/ConcurrentModel.java +++ b/spring-context/src/main/java/org/springframework/ui/ConcurrentModel.java @@ -85,10 +85,9 @@ public class ConcurrentModel extends ConcurrentHashMap implement * the model when using this method because we cannot correctly determine * the true convention name. View code should check for {@code null} rather * than for empty collections as is already done by JSTL tags. - * @param attributeValue the model attribute value (never {@code null} for {@code ConcurrentModel}, - * with the {@code Nullable} declaration inherited from {@link Model#addAttribute(String, Object)}) + * @param attributeValue the model attribute value (never {@code null}) */ - public ConcurrentModel addAttribute(@Nullable Object attributeValue) { + public ConcurrentModel addAttribute(Object attributeValue) { Assert.notNull(attributeValue, "Model attribute value must not be null"); if (attributeValue instanceof Collection && ((Collection) attributeValue).isEmpty()) { return this;