mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-01 23:09:01 +00:00
Improve null-safety of module/spring-boot-rsocket
See gh-46926
This commit is contained in:
+4
-2
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.boot.rsocket.context;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -65,8 +66,9 @@ public class RSocketPortInfoApplicationContextInitializer
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(RSocketServerInitializedEvent event) {
|
||||
if (event.getServer().address() != null) {
|
||||
setPortProperty(this.applicationContext, event.getServer().address().getPort());
|
||||
InetSocketAddress address = event.getServer().address();
|
||||
if (address != null) {
|
||||
setPortProperty(this.applicationContext, address.getPort());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user