Polishing
This commit is contained in:
@@ -400,7 +400,6 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
* Private constructor that can create read-only {@code HttpHeader} instances.
|
||||
*/
|
||||
private HttpHeaders(Map<String, List<String>> headers, boolean readOnly) {
|
||||
Assert.notNull(headers, "'headers' must not be null");
|
||||
if (readOnly) {
|
||||
Map<String, List<String>> map =
|
||||
new LinkedCaseInsensitiveMap<List<String>>(headers.size(), Locale.ENGLISH);
|
||||
@@ -1319,6 +1318,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
* Return a {@code HttpHeaders} object that can only be read, not written to.
|
||||
*/
|
||||
public static HttpHeaders readOnlyHttpHeaders(HttpHeaders headers) {
|
||||
Assert.notNull(headers, "HttpHeaders must not be null");
|
||||
return new HttpHeaders(headers, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user