From cd8081f9522b57700e9fe448150f593dbea411b0 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 7 Jul 2020 10:09:48 +0100 Subject: [PATCH] Polish "Use new ArrayList(Collection) rather than new and addAll" See gh-22211 --- .../embedded/undertow/UndertowWebServerFactoryDelegate.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowWebServerFactoryDelegate.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowWebServerFactoryDelegate.java index c9bfa761455..925df1b00c1 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowWebServerFactoryDelegate.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowWebServerFactoryDelegate.java @@ -189,8 +189,7 @@ class UndertowWebServerFactoryDelegate { static List createHttpHandlerFactories(Compression compression, boolean useForwardHeaders, String serverHeader, Shutdown shutdown, HttpHandlerFactory... initialHttpHandlerFactories) { - List factories = - new ArrayList(Arrays.asList(initialHttpHandlerFactories)); + List factories = new ArrayList<>(Arrays.asList(initialHttpHandlerFactories)); if (compression != null && compression.getEnabled()) { factories.add(new CompressionHttpHandlerFactory(compression)); }