mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-28 15:52:13 +00:00
Avoid unnecessary grow of ArrayList
Adapted ArrayList size in CacheControlHeadersWriter::createHeaders()
This commit is contained in:
parent
3740d33e64
commit
0570cebbce
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2017 the original author or authors.
|
* Copyright 2002-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -74,7 +74,7 @@ public final class CacheControlHeadersWriter implements HeaderWriter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static List<Header> createHeaders() {
|
private static List<Header> createHeaders() {
|
||||||
List<Header> headers = new ArrayList<>(2);
|
List<Header> headers = new ArrayList<>(3);
|
||||||
headers.add(new Header(CACHE_CONTROL,
|
headers.add(new Header(CACHE_CONTROL,
|
||||||
"no-cache, no-store, max-age=0, must-revalidate"));
|
"no-cache, no-store, max-age=0, must-revalidate"));
|
||||||
headers.add(new Header(PRAGMA, "no-cache"));
|
headers.add(new Header(PRAGMA, "no-cache"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user