Commit 9e6aa021 by Jason Song

make counter random

parent d0d412c4
......@@ -6,6 +6,7 @@ import com.ctrip.apollo.biz.entity.Namespace;
import com.ctrip.apollo.core.utils.ByteUtil;
import com.ctrip.apollo.core.utils.MachineUtil;
import java.security.SecureRandom;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
......@@ -17,7 +18,7 @@ import java.util.concurrent.atomic.AtomicInteger;
*/
public class ReleaseKeyGenerator {
private static final DateFormat TIMESTAMP_FORMAT = new SimpleDateFormat("yyyyMMddHHmmss");
private static final AtomicInteger releaseCounter = new AtomicInteger();
private static final AtomicInteger releaseCounter = new AtomicInteger(new SecureRandom().nextInt());
private static final Joiner KEY_JOINER = Joiner.on("-");
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment