Add Sequence delivers duplicate ids when running in copies (bug fix)
@@ -119,6 +119,7 @@ public class Counter {
long value = counter;
long nextValue = counter + increment;
+ if (loop) {
if (increment < 0) {
if (maximum < start && nextValue < maximum) {
nextValue = start;
@@ -128,6 +129,7 @@ public class Counter {
nextValue = start;
}
}
+ }
counter = nextValue;
return value;
