Skip to content

Commit

Permalink
Merge 96f6040 into 9f95a97
Browse files Browse the repository at this point in the history
  • Loading branch information
lovelife-li committed Nov 9, 2020
2 parents 9f95a97 + 96f6040 commit 8e2220c
Showing 1 changed file with 0 additions and 5 deletions.
Expand Up @@ -27,15 +27,10 @@ public int getAndIncrement() {
Integer index = this.threadLocalIndex.get();
if (null == index) {
index = Math.abs(random.nextInt());
if (index < 0)
index = 0;
this.threadLocalIndex.set(index);
}

index = Math.abs(index + 1);
if (index < 0)
index = 0;

this.threadLocalIndex.set(index);
return index;
}
Expand Down

0 comments on commit 8e2220c

Please sign in to comment.