Update README.md

This commit is contained in:
Fabio Lima 2021-11-15 08:19:25 -03:00 committed by GitHub
parent 1cc8ed180e
commit 4b24b03f8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -225,9 +225,9 @@ Use a `UlidFactory` with `ThreadLocalRandom` inside of a `Supplier<byte[]>`:
```java
// use a random supplier that returns an array of 10 bytes
UlidFactory factory = UlidFactory.newInstance(() -> {
final byte[] bytes = new byte[Ulid.RANDOM_BYTES];
ThreadLocalRandom.current().nextBytes(bytes);
return bytes;
final byte[] bytes = new byte[Ulid.RANDOM_BYTES];
ThreadLocalRandom.current().nextBytes(bytes);
return bytes;
});
// use the factory