This commit is contained in:
2024-02-20 16:08:28 +08:00
parent 055a55cda1
commit e6bfafa686
2 changed files with 5 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
package com.jsowell.common.util.id;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.exception.UtilException;
import java.security.MessageDigest;
@@ -133,7 +134,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
throw new IllegalArgumentException("Invalid UUID string: " + name);
}
for (int i = 0; i < 5; i++) {
components[i] = "0x" + components[i];
components[i] = Constants.HEX_PREFIX + components[i];
}
long mostSigBits = Long.decode(components[0]).longValue();