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