From 84ecbb3f2b9b6ab3560a32fdd3a2e50f363f9630 Mon Sep 17 00:00:00 2001 From: Julien Viet Date: Thu, 2 Nov 2023 16:17:47 +0100 Subject: [PATCH] Minor cosmetic --- .../java/io/vertx/core/loadbalancing/LoadBalancer.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/io/vertx/core/loadbalancing/LoadBalancer.java b/src/main/java/io/vertx/core/loadbalancing/LoadBalancer.java index ef7db797627..4d93ddb1304 100644 --- a/src/main/java/io/vertx/core/loadbalancing/LoadBalancer.java +++ b/src/main/java/io/vertx/core/loadbalancing/LoadBalancer.java @@ -32,12 +32,9 @@ public interface LoadBalancer { */ LoadBalancer ROUND_ROBIN = () -> { AtomicInteger idx = new AtomicInteger(); - return new EndpointSelector() { - @Override - public int selectEndpoint(List> endpoints) { - int next = idx.getAndIncrement(); - return next % endpoints.size(); - } + return (EndpointSelector) endpoints -> { + int next = idx.getAndIncrement(); + return next % endpoints.size(); }; };