From bc4a11dd7b50f83e314f42c2da99d011cb9de8d3 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 3 May 2017 17:09:02 +0100 Subject: [PATCH] Make argument ordering consistent across web server initialized events --- .../web/servlet/context/ServletWebServerApplicationContext.java | 2 +- .../web/servlet/context/ServletWebServerInitializedEvent.java | 2 +- .../boot/system/EmbeddedServerPortFileWriterTests.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java b/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java index 03d92ad23e2..aaab1164893 100644 --- a/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java +++ b/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java @@ -143,7 +143,7 @@ public class ServletWebServerApplicationContext extends GenericWebApplicationCon super.finishRefresh(); WebServer webServer = startWebServer(); if (webServer != null) { - publishEvent(new ServletWebServerInitializedEvent(this, webServer)); + publishEvent(new ServletWebServerInitializedEvent(webServer, this)); } } diff --git a/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerInitializedEvent.java b/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerInitializedEvent.java index 83a6c98d3da..d1e33b53276 100644 --- a/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerInitializedEvent.java +++ b/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerInitializedEvent.java @@ -37,7 +37,7 @@ public class ServletWebServerInitializedEvent extends WebServerInitializedEvent private final ServletWebServerApplicationContext applicationContext; public ServletWebServerInitializedEvent( - ServletWebServerApplicationContext applicationContext, WebServer source) { + WebServer source, ServletWebServerApplicationContext applicationContext) { super(source); this.applicationContext = applicationContext; } diff --git a/spring-boot/src/test/java/org/springframework/boot/system/EmbeddedServerPortFileWriterTests.java b/spring-boot/src/test/java/org/springframework/boot/system/EmbeddedServerPortFileWriterTests.java index 3fef768112a..e94033800c6 100644 --- a/spring-boot/src/test/java/org/springframework/boot/system/EmbeddedServerPortFileWriterTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/system/EmbeddedServerPortFileWriterTests.java @@ -67,7 +67,7 @@ public class EmbeddedServerPortFileWriterTests { WebServer source = mock(WebServer.class); given(source.getPort()).willReturn(port); ServletWebServerInitializedEvent event = new ServletWebServerInitializedEvent( - applicationContext, source); + source, applicationContext); return event; }; BiFunction reactiveEvent = (