mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Use new ArrayList(Collection) rather than new and addAll
See gh-22211
This commit is contained in:
parent
54ce2905af
commit
fb70c529d4
@ -189,8 +189,8 @@ class UndertowWebServerFactoryDelegate {
|
||||
|
||||
static List<HttpHandlerFactory> createHttpHandlerFactories(Compression compression, boolean useForwardHeaders,
|
||||
String serverHeader, Shutdown shutdown, HttpHandlerFactory... initialHttpHandlerFactories) {
|
||||
List<HttpHandlerFactory> factories = new ArrayList<HttpHandlerFactory>();
|
||||
factories.addAll(Arrays.asList(initialHttpHandlerFactories));
|
||||
List<HttpHandlerFactory> factories =
|
||||
new ArrayList<HttpHandlerFactory>(Arrays.asList(initialHttpHandlerFactories));
|
||||
if (compression != null && compression.getEnabled()) {
|
||||
factories.add(new CompressionHttpHandlerFactory(compression));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user