Class SafeRandomUUIDGenerator

java.lang.Object
org.hibernate.testing.util.uuid.SafeRandomUUIDGenerator

public class SafeRandomUUIDGenerator extends Object
  • Constructor Details

    • SafeRandomUUIDGenerator

      public SafeRandomUUIDGenerator()
  • Method Details

    • safeRandomUUID

      public static UUID safeRandomUUID()
      Returns:
      A random UUID that is guaranteed not to end with a trailing 0 byte
    • safeRandomUUIDAsString

      public static String safeRandomUUIDAsString()
      Returns:
      The String representation of a random UUID that is guaranteed not to end with a trailing 0 byte
    • isSafeUUID

      public static boolean isSafeUUID(UUID uuid)
      Parameters:
      uuid - The UUID to be tested
      Returns:
      true if the UUID doesn't end with a trailing 0 byte, false otherwise