Skip to content

Commit ca3ba7d

Browse files
committed
Extended/BindingAwareModelMap are not meant to be referred to in user code
Issue: SPR-12896
1 parent 11ec999 commit ca3ba7d

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

spring-context/src/main/java/org/springframework/ui/ExtendedModelMap.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,6 +23,11 @@
2323
* Subclass of {@link ModelMap} that implements the {@link Model} interface.
2424
* Java 5 specific like the {@code Model} interface itself.
2525
*
26+
* <p>This is an implementation class exposed to handler methods by Spring MVC, typically via
27+
* a declaration of the {@link org.springframework.ui.Model} interface. There is no need to
28+
* build it within user code; a plain {@link org.springframework.ui.ModelMap} or even a just
29+
* a regular {@link Map} with String keys will be good enough to return a user model.
30+
*
2631
* @author Juergen Hoeller
2732
* @since 2.5.1
2833
*/

spring-context/src/main/java/org/springframework/validation/support/BindingAwareModelMap.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,12 +22,14 @@
2222
import org.springframework.validation.BindingResult;
2323

2424
/**
25-
* Subclass of {@link org.springframework.ui.ExtendedModelMap} that
26-
* automatically removes a {@link org.springframework.validation.BindingResult}
27-
* object if the corresponding target attribute gets replaced.
25+
* Subclass of {@link org.springframework.ui.ExtendedModelMap} that automatically removes
26+
* a {@link org.springframework.validation.BindingResult} object if the corresponding
27+
* target attribute gets replaced through regulat {@link Map} operations.
2828
*
29-
* <p>Used by {@link org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter}
30-
* and {@link org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter}.
29+
* <p>This is the class exposed to handler methods by Spring MVC, typically consumed through
30+
* a declaration of the {@link org.springframework.ui.Model} interface. There is no need to
31+
* build it within user code; a plain {@link org.springframework.ui.ModelMap} or even a just
32+
* a regular {@link Map} with String keys will be good enough to return a user model.
3133
*
3234
* @author Juergen Hoeller
3335
* @since 2.5.6

0 commit comments

Comments
 (0)