Fix accidental @Nullable declaration on addAttribute(Object)

Issue: SPR-16831
This commit is contained in:
Juergen Hoeller
2018-07-04 15:06:56 +02:00
parent 160002cf8b
commit a5dd0f0c09

View File

@@ -85,10 +85,9 @@ public class ConcurrentModel extends ConcurrentHashMap<String, Object> 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.</i>
* @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;