Skip to content

Commit a5a0840

Browse files
committed
Stop implying that HttpHeaders implements java.util.Map
1 parent a54618b commit a5a0840

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

spring-web/src/main/java/org/springframework/http/HttpHeaders.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,33 +57,32 @@
5757
import org.springframework.util.StringUtils;
5858

5959
/**
60-
* A data structure representing HTTP request or response headers, mapping String header names
61-
* to a list of String values, also offering accessors for common application-level data types.
60+
* A data structure representing HTTP request or response headers, mapping String
61+
* header names to a list of String values and also offering accessors for common
62+
* application-level data types.
6263
*
63-
* <p>In addition to the regular methods defined by {@link Map}, this class offers many common
64-
* convenience methods, for example:
64+
* <p>This class offers many common convenience methods, for example:
6565
* <ul>
6666
* <li>{@link #getFirst(String)} returns the first value associated with a given header name</li>
6767
* <li>{@link #add(String, String)} adds a header value to the list of values for a header name</li>
6868
* <li>{@link #set(String, String)} sets the header value to a single string value</li>
6969
* </ul>
7070
*
7171
* <p>Note that {@code HttpHeaders} instances created by the default constructor
72-
* treat header names in a case-insensitive manner. Instances created with the
73-
* {@link #HttpHeaders(MultiValueMap)} constructor like those instantiated
72+
* treat header names in a case-insensitive manner; whereas, instances created with
73+
* the {@link #HttpHeaders(MultiValueMap)} constructor &mdash; like those instantiated
7474
* internally by the framework to adapt to existing HTTP headers data structures
75-
* do guarantee per-header get/set/add operations to be case-insensitive as
75+
* &mdash; guarantee per-header get/set/add operations to be case-insensitive as
7676
* mandated by the HTTP specification. However, it is not necessarily how
77-
* entries are actually stored, and this can lead to the reported {@code size()}
77+
* entries are actually stored, and this can lead to the reported {@link #size()}
7878
* being inflated. Prefer using {@link #headerSet()} or {@link #headerNames()}
7979
* to ensure a case-insensitive view.
8080
*
8181
* <p>This class is meant to reference "well-known" headers supported by Spring
8282
* Framework. If your application or library relies on other headers defined in RFCs,
8383
* please use methods that accept the header name as a parameter.
8484
*
85-
* <p>Since 7.0, this class no longer implements the {@code MultiValueMap}
86-
* contract.
85+
* <p>Since 7.0, this class no longer implements the {@code MultiValueMap} contract.
8786
*
8887
* @author Arjen Poutsma
8988
* @author Sebastien Deleuze

0 commit comments

Comments
 (0)