Browse Source

Improve null-safety of module/spring-boot-mongodb

See gh-46926
pull/46973/head
Moritz Halbritter 8 months ago
parent
commit
eb14624047
  1. 5
      module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/autoconfigure/MongoReactiveAutoConfiguration.java

5
module/spring-boot-mongodb/src/main/java/org/springframework/boot/mongodb/autoconfigure/MongoReactiveAutoConfiguration.java

@ -117,8 +117,9 @@ public final class MongoReactiveAutoConfiguration {
@Override @Override
public void customize(Builder builder) { public void customize(Builder builder) {
if (!isCustomTransportConfiguration(this.settings.getIfAvailable())) { if (!isCustomTransportConfiguration(this.settings.getIfAvailable())) {
this.eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()); EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
builder.transportSettings(TransportSettings.nettyBuilder().eventLoopGroup(this.eventLoopGroup).build()); this.eventLoopGroup = eventLoopGroup;
builder.transportSettings(TransportSettings.nettyBuilder().eventLoopGroup(eventLoopGroup).build());
} }
} }

Loading…
Cancel
Save