Browse Source

Make argument ordering consistent across web server initialized events

pull/6863/merge
Andy Wilkinson 9 years ago
parent
commit
bc4a11dd7b
  1. 2
      spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java
  2. 2
      spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerInitializedEvent.java
  3. 2
      spring-boot/src/test/java/org/springframework/boot/system/EmbeddedServerPortFileWriterTests.java

2
spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerApplicationContext.java

@ -143,7 +143,7 @@ public class ServletWebServerApplicationContext extends GenericWebApplicationCon @@ -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));
}
}

2
spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerInitializedEvent.java

@ -37,7 +37,7 @@ public class ServletWebServerInitializedEvent extends WebServerInitializedEvent @@ -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;
}

2
spring-boot/src/test/java/org/springframework/boot/system/EmbeddedServerPortFileWriterTests.java

@ -67,7 +67,7 @@ public class EmbeddedServerPortFileWriterTests { @@ -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<String, Integer, ? extends WebServerInitializedEvent> reactiveEvent = (

Loading…
Cancel
Save