From 18474c921df8003c6ce778cc9ab9979dd29d428a Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Fri, 24 Apr 2020 13:02:12 +0100 Subject: [PATCH] Document IAE in HttpHeaders methods that parse ETags See gh-24950 --- .../src/main/java/org/springframework/http/HttpHeaders.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-web/src/main/java/org/springframework/http/HttpHeaders.java b/spring-web/src/main/java/org/springframework/http/HttpHeaders.java index 68c4ab013c..eaf831696a 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpHeaders.java +++ b/spring-web/src/main/java/org/springframework/http/HttpHeaders.java @@ -1140,6 +1140,7 @@ public class HttpHeaders implements MultiValueMap, Serializable /** * Return the value of the {@code If-Match} header. + * @throws IllegalArgumentException if parsing fails * @since 4.3 */ public List getIfMatch() { @@ -1199,6 +1200,7 @@ public class HttpHeaders implements MultiValueMap, Serializable /** * Return the value of the {@code If-None-Match} header. + * @throws IllegalArgumentException if parsing fails */ public List getIfNoneMatch() { return getETagValuesAsList(IF_NONE_MATCH); @@ -1542,6 +1544,7 @@ public class HttpHeaders implements MultiValueMap, Serializable * Retrieve a combined result from the field values of the ETag header. * @param headerName the header name * @return the combined result + * @throws IllegalArgumentException if parsing fails * @since 4.3 */ protected List getETagValuesAsList(String headerName) {