1
1
/*
2
- * Copyright 2002-2017 the original author or authors.
2
+ * Copyright 2002-2018 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -68,7 +68,8 @@ public ConcurrentModel(Object attributeValue) {
68
68
/**
69
69
* Add the supplied attribute under the supplied name.
70
70
* @param attributeName the name of the model attribute (never {@code null})
71
- * @param attributeValue the model attribute value (can be {@code null})
71
+ * @param attributeValue the model attribute value (never {@code null} for {@code ConcurrentModel},
72
+ * with the {@code Nullable} declaration inherited from {@link Model#addAttribute(String, Object)})
72
73
*/
73
74
public ConcurrentModel addAttribute (String attributeName , @ Nullable Object attributeValue ) {
74
75
Assert .notNull (attributeName , "Model attribute name must not be null" );
@@ -80,14 +81,14 @@ public ConcurrentModel addAttribute(String attributeName, @Nullable Object attri
80
81
/**
81
82
* Add the supplied attribute to this {@code Map} using a
82
83
* {@link org.springframework.core.Conventions#getVariableName generated name}.
83
- * <p><emphasis >Note: Empty {@link Collection Collections} are not added to
84
+ * <p><i >Note: Empty {@link Collection Collections} are not added to
84
85
* the model when using this method because we cannot correctly determine
85
86
* the true convention name. View code should check for {@code null} rather
86
- * than for empty collections as is already done by JSTL tags.</emphasis >
87
+ * than for empty collections as is already done by JSTL tags.</i >
87
88
* @param attributeValue the model attribute value (never {@code null})
88
89
*/
89
- public ConcurrentModel addAttribute (@ Nullable Object attributeValue ) {
90
- Assert .notNull (attributeValue , "Model object must not be null" );
90
+ public ConcurrentModel addAttribute (Object attributeValue ) {
91
+ Assert .notNull (attributeValue , "Model attribute value must not be null" );
91
92
if (attributeValue instanceof Collection && ((Collection <?>) attributeValue ).isEmpty ()) {
92
93
return this ;
93
94
}
0 commit comments