Skip to content

Commit

Permalink
Minor cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Nov 2, 2023
1 parent 4460cda commit 84ecbb3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/main/java/io/vertx/core/loadbalancing/LoadBalancer.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@ public interface LoadBalancer {
*/
LoadBalancer ROUND_ROBIN = () -> {
AtomicInteger idx = new AtomicInteger();
return new EndpointSelector() {
@Override
public int selectEndpoint(List<EndpointMetrics<?>> endpoints) {
int next = idx.getAndIncrement();
return next % endpoints.size();
}
return (EndpointSelector) endpoints -> {
int next = idx.getAndIncrement();
return next % endpoints.size();
};
};

Expand Down

0 comments on commit 84ecbb3

Please sign in to comment.