mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-29 21:59:02 +00:00
Merge pull request #22211 from XenoAmess
* gh-22211: Polish "Use new ArrayList(Collection) rather than new and addAll" Use new ArrayList(Collection) rather than new and addAll Closes gh-22211
This commit is contained in:
+1
-2
@@ -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>();
|
||||
factories.addAll(Arrays.asList(initialHttpHandlerFactories));
|
||||
List<HttpHandlerFactory> factories = new ArrayList<>(Arrays.asList(initialHttpHandlerFactories));
|
||||
if (compression != null && compression.getEnabled()) {
|
||||
factories.add(new CompressionHttpHandlerFactory(compression));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user