From e4a6d899f31b09032be4d49363c74d1bad26284a Mon Sep 17 00:00:00 2001 From: Fabio Lima Date: Sat, 22 Feb 2020 13:26:15 -0300 Subject: [PATCH] Changed UlidCreator --- src/main/java/com/github/f4b6a3/ulid/UlidCreator.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/github/f4b6a3/ulid/UlidCreator.java b/src/main/java/com/github/f4b6a3/ulid/UlidCreator.java index 2a2f58a..bf06d28 100644 --- a/src/main/java/com/github/f4b6a3/ulid/UlidCreator.java +++ b/src/main/java/com/github/f4b6a3/ulid/UlidCreator.java @@ -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(); } /**