@@ -496,7 +496,7 @@ public HttpHeaders(HttpHeaders httpHeaders) {
496
496
* Get the list of header values for the given header name, if any.
497
497
* @param headerName the header name
498
498
* @return the list of header values, or an empty list
499
- * @since 5.2
499
+ * @since 7.0
500
500
*/
501
501
public List <String > getOrEmpty (String headerName ) {
502
502
return getOrDefault (headerName , Collections .emptyList ());
@@ -508,6 +508,7 @@ public List<String> getOrEmpty(String headerName) {
508
508
* @param headerName the header name
509
509
* @param defaultValue the fallback list if header is not present
510
510
* @return the list of header values, or a default list of values
511
+ * @since 7.0
511
512
*/
512
513
public List <String > getOrDefault (String headerName , List <String > defaultValue ) {
513
514
List <String > values = get (headerName );
@@ -1796,6 +1797,7 @@ public void addAll(String headerName, List<? extends String> headerValues) {
1796
1797
* values of each individual header name instead.
1797
1798
* @param headers the headers to add
1798
1799
* @see #putAll(HttpHeaders)
1800
+ * @since 7.0
1799
1801
*/
1800
1802
public void addAll (HttpHeaders headers ) {
1801
1803
this .headers .addAll (headers .headers );
@@ -1866,6 +1868,7 @@ public Map<String, String> asSingleValueMap() {
1866
1868
* @deprecated This method is provided for backward compatibility with APIs
1867
1869
* that would only accept maps. Generally avoid using HttpHeaders as a Map
1868
1870
* or MultiValueMap.
1871
+ * @since 7.0
1869
1872
*/
1870
1873
@ Deprecated
1871
1874
public MultiValueMap <String , String > asMultiValueMap () {
@@ -1920,6 +1923,7 @@ public boolean containsHeaderValue(String headerName, String value) {
1920
1923
/**
1921
1924
* Get the list of values associated with the given header name.
1922
1925
* @param headerName the header name
1926
+ * @since 7.0
1923
1927
*/
1924
1928
@ Nullable
1925
1929
public List <String > get (String headerName ) {
@@ -1953,6 +1957,7 @@ public List<String> get(String headerName) {
1953
1957
* Put all the entries from the given HttpHeaders into this HttpHeaders.
1954
1958
* @param headers the given headers
1955
1959
* @see #put(String, List)
1960
+ * @since 7.0
1956
1961
*/
1957
1962
public void putAll (HttpHeaders headers ) {
1958
1963
this .headers .putAll (headers .headers );
@@ -1973,6 +1978,7 @@ public void putAll(Map<? extends String, ? extends List<String>> headers) {
1973
1978
* value list or {@code null} if that header wasn't present.
1974
1979
* @param key the name of the header to remove
1975
1980
* @return the value list associated with the removed header name
1981
+ * @since 7.0
1976
1982
*/
1977
1983
public @ Nullable List <String > remove (String key ) {
1978
1984
return this .headers .remove (key );
0 commit comments