Reformat.

This commit is contained in:
Olga Maciaszek-Sharma
2022-06-29 13:06:31 +02:00
parent ecec99a37d
commit 374cf977ac
2 changed files with 3 additions and 1 deletions

View File

@@ -100,7 +100,8 @@ public class RoundRobinLoadBalancer implements ReactorServiceInstanceLoadBalance
return new EmptyResponse();
}
// Ignore the sign bit, this allows pos to loop sequentially from 0 to Integer.MAX_VALUE
// Ignore the sign bit, this allows pos to loop sequentially from 0 to
// Integer.MAX_VALUE
int pos = this.position.incrementAndGet() & Integer.MAX_VALUE;
ServiceInstance instance = instances.get(pos % instances.size());

View File

@@ -73,4 +73,5 @@ class RoundRobinLoadBalancerTests {
assertThat(chosen.getInstanceId()).isEqualTo(instanceId + "");
}
}
}