From 3286aab10c4b7a438e5b24c0a80bd368d7ad89e5 Mon Sep 17 00:00:00 2001 From: "@hangga" Date: Wed, 1 Nov 2023 18:24:02 +0700 Subject: [PATCH] bit 16 to 64 --- .../main/java/com/baeldung/uuid/UUIDPositiveLongGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-java-modules/core-java-uuid/src/main/java/com/baeldung/uuid/UUIDPositiveLongGenerator.java b/core-java-modules/core-java-uuid/src/main/java/com/baeldung/uuid/UUIDPositiveLongGenerator.java index bc8177837c..bb3e0223f3 100644 --- a/core-java-modules/core-java-uuid/src/main/java/com/baeldung/uuid/UUIDPositiveLongGenerator.java +++ b/core-java-modules/core-java-uuid/src/main/java/com/baeldung/uuid/UUIDPositiveLongGenerator.java @@ -22,7 +22,7 @@ public class UUIDPositiveLongGenerator { public long combineByteBuffer(){ UUID uuid = UUID.randomUUID(); - ByteBuffer bb = ByteBuffer.wrap(new byte[16]); + ByteBuffer bb = ByteBuffer.wrap(new byte[64]); bb.putLong(uuid.getMostSignificantBits()); bb.putLong(uuid.getLeastSignificantBits()); bb.rewind();