Polishing

This commit is contained in:
Juergen Hoeller
2014-08-11 15:45:54 +02:00
parent 1034b0dae2
commit e2d71a8ccd
7 changed files with 33 additions and 22 deletions

View File

@@ -276,12 +276,13 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement
@SuppressWarnings("unchecked")
Map<String, Object> pathVars = (this.exposePathVariables ?
(Map<String, Object>) request.getAttribute(View.PATH_VARIABLES) : null);
(Map<String, Object>) request.getAttribute(View.PATH_VARIABLES) : null);
// Consolidate static and dynamic model attributes.
int size = this.staticAttributes.size();
size += (model != null) ? model.size() : 0;
size += (pathVars != null) ? pathVars.size() : 0;
size += (model != null ? model.size() : 0);
size += (pathVars != null ? pathVars.size() : 0);
Map<String, Object> mergedModel = new LinkedHashMap<String, Object>(size);
mergedModel.putAll(this.staticAttributes);
if (pathVars != null) {