diff --git a/choam/src/main/java/com/salesforce/apollo/choam/ViewAssembly.java b/choam/src/main/java/com/salesforce/apollo/choam/ViewAssembly.java index baf5250ee..96d5cbd37 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/ViewAssembly.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/ViewAssembly.java @@ -23,10 +23,7 @@ import org.slf4j.LoggerFactory; import java.security.PublicKey; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; @@ -269,6 +266,7 @@ private Map assemblyOf(List committee) { var last = view.pendingViews().last(); return committee.stream() .map(d -> last.context().getMember(Digest.from(d))) + .filter(Objects::nonNull) .collect(Collectors.toMap(Member::getId, m -> m)); } diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/Enclave.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/Enclave.java index 5a6d81417..5ae364d6c 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/Enclave.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/Enclave.java @@ -28,6 +28,7 @@ import java.util.List; import java.util.concurrent.Executor; +import java.util.concurrent.Executors; import java.util.function.Consumer; import java.util.function.Predicate; import java.util.function.Supplier; @@ -45,7 +46,7 @@ public class Enclave implements RouterSupplier { private final static Class channelType = IMPL.getChannelType(); private static final Logger log = LoggerFactory.getLogger(Enclave.class); - private final Executor executor = UnsafeExecutors.newVirtualThreadPerTaskExecutor(); + private final Executor executor = Executors.newVirtualThreadPerTaskExecutor(); private final DomainSocketAddress bridge; private final Consumer contextRegistration; private final DomainSocketAddress endpoint; diff --git a/memberships/src/main/java/com/salesforce/apollo/archipelago/MtlsServer.java b/memberships/src/main/java/com/salesforce/apollo/archipelago/MtlsServer.java index b7802a6a1..0a800fa92 100644 --- a/memberships/src/main/java/com/salesforce/apollo/archipelago/MtlsServer.java +++ b/memberships/src/main/java/com/salesforce/apollo/archipelago/MtlsServer.java @@ -44,6 +44,7 @@ import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; +import java.util.concurrent.Executors; import java.util.function.Function; import java.util.function.Predicate; import java.util.function.Supplier; @@ -70,7 +71,7 @@ public MtlsServer(Member from, EndpointProvider epProvider, Function() { @Override public Digest load(X509Certificate key) throws Exception { @@ -147,8 +148,7 @@ public RouterImpl router(ServerConnectionCache.Builder cacheBuilder, Supplier
  • { private final static Class channelType = IMPL.getChannelType(); - private final Executor executor = UnsafeExecutors.newVirtualThreadPerTaskExecutor(); + private final Executor executor = Executors.newVirtualThreadPerTaskExecutor(); private final String agent; private final EventLoopGroup eventLoopGroup = IMPL.getEventLoopGroup(); private final Demultiplexer inbound;