Changed UlidCreator
This commit is contained in:
parent
8f7aa36960
commit
e4a6d899f3
|
@ -28,7 +28,6 @@ import java.util.UUID;
|
||||||
|
|
||||||
import com.github.f4b6a3.ulid.exception.UlidCreatorException;
|
import com.github.f4b6a3.ulid.exception.UlidCreatorException;
|
||||||
import com.github.f4b6a3.ulid.guid.GuidCreator;
|
import com.github.f4b6a3.ulid.guid.GuidCreator;
|
||||||
import com.github.f4b6a3.ulid.util.UlidUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A factory for Universally Unique Lexicographically Sortable Identifiers.
|
* A factory for Universally Unique Lexicographically Sortable Identifiers.
|
||||||
|
@ -82,8 +81,7 @@ public class UlidCreator {
|
||||||
* @return a GUID
|
* @return a GUID
|
||||||
*/
|
*/
|
||||||
public static byte[] getBytes() {
|
public static byte[] getBytes() {
|
||||||
UUID guid = getGuid();
|
return GuidCreatorLazyHolder.INSTANCE.createBytes();
|
||||||
return UlidUtil.fromUuidToBytes(guid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -92,8 +90,7 @@ public class UlidCreator {
|
||||||
* @return a GUID
|
* @return a GUID
|
||||||
*/
|
*/
|
||||||
public static byte[] getFastBytes() {
|
public static byte[] getFastBytes() {
|
||||||
UUID guid = getFastGuid();
|
return FastGuidCreatorLazyHolder.INSTANCE.createBytes();
|
||||||
return UlidUtil.fromUuidToBytes(guid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue