We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b356b89 commit 8dbf326Copy full SHA for 8dbf326
src/test/java/com/uid2/admin/salt/helper/SaltBuilder.java
@@ -1,15 +1,15 @@
1
package com.uid2.admin.salt.helper;
2
3
-import com.uid2.admin.salt.SaltRotation;
4
import com.uid2.admin.salt.TargetDate;
5
import com.uid2.shared.model.SaltEntry;
6
7
import java.time.Instant;
+import java.util.concurrent.atomic.AtomicInteger;
8
9
public class SaltBuilder {
10
- private static int lastAutoId = 0;
+ private static final AtomicInteger LAST_AUTO_ID = new AtomicInteger(0);
11
12
- private int id = lastAutoId++;
+ private int id = LAST_AUTO_ID.incrementAndGet();
13
private Instant lastUpdated = Instant.now();
14
private Instant refreshFrom = Instant.now();
15
private String currentSalt = null;
0 commit comments