Changed UlidCreator

This commit is contained in:
Fabio Lima 2020-02-22 13:26:15 -03:00
parent 8f7aa36960
commit e4a6d899f3
1 changed files with 2 additions and 5 deletions

View File

@ -28,7 +28,6 @@ import java.util.UUID;
import com.github.f4b6a3.ulid.exception.UlidCreatorException;
import com.github.f4b6a3.ulid.guid.GuidCreator;
import com.github.f4b6a3.ulid.util.UlidUtil;
/**
* A factory for Universally Unique Lexicographically Sortable Identifiers.
@ -82,8 +81,7 @@ public class UlidCreator {
* @return a GUID
*/
public static byte[] getBytes() {
UUID guid = getGuid();
return UlidUtil.fromUuidToBytes(guid);
return GuidCreatorLazyHolder.INSTANCE.createBytes();
}
/**
@ -92,8 +90,7 @@ public class UlidCreator {
* @return a GUID
*/
public static byte[] getFastBytes() {
UUID guid = getFastGuid();
return UlidUtil.fromUuidToBytes(guid);
return FastGuidCreatorLazyHolder.INSTANCE.createBytes();
}
/**