From 3f10989f740123b6bf8536cd41b47688d12ac914 Mon Sep 17 00:00:00 2001 From: Fabio Lima Date: Sat, 30 Jan 2021 09:29:46 -0300 Subject: [PATCH] [maven-release-plugin] prepare for next development iteration --- README.md | 8 ++++---- pom.xml | 4 ++-- src/main/java/com/github/f4b6a3/ulid/Ulid.java | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6e4ca21..438e163 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Implementation ### ULID -The ULID is a 128 bit long identifier. The first 48 bits represent the count of milliseconds since Unix Epoch, 1 January 1970. The remaining 60 bits are generated by a secure random number generator. +The ULID is a 128 bit long identifier. The first 48 bits represent the count of milliseconds since Unix Epoch, 1970-01-01. The remaining 80 bits are generated by a secure random number generator. ```java // Generate a ULID @@ -84,7 +84,7 @@ Sequence of ULIDs: ### Monotonic ULID -The Monotonic ULID is a 128 bit long identifier. The first 48 bits represent the count of milliseconds since Unix Epoch, 1 January 1970. The remaining 60 bits are generated by a secure random number generator. +The Monotonic ULID is a 128 bit long identifier. The first 48 bits represent the count of milliseconds since Unix Epoch, 1970-01-01. The remaining 80 bits are generated by a secure random number generator. The random component is incremented by 1 whenever the current millisecond is equal to the previous one. But when the current millisecond is different, the random component changes to another random value. @@ -180,7 +180,7 @@ Get the random component of a ULID: byte[] random = ulid.getRandom(); // 10 bytes (80 bits) ``` -Use a `UlidFctory` instance with `java.util.Random` to generate ULIDs: +Use a `UlidFactory` instance with `java.util.Random` to generate ULIDs: ```java Random random = new Random(); @@ -189,7 +189,7 @@ UlidFactory factory = UlidCreator.getDefaultFactory().withRandomGenerator(random Ulid ulid = facory.create(); ``` -Use a `UlidFctory` instance with any random generator you like(*) to generate ULIDs: +Use a `UlidFactory` instance with any random generator you like(*) to generate ULIDs: ```java import com.github.niceguy.random.AwesomeRandom; // a hypothetical RNG diff --git a/pom.xml b/pom.xml index aad277f..036a865 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.github.f4b6a3 ulid-creator - 3.0.1 + 3.0.2-SNAPSHOT jar ulid-creator @@ -44,7 +44,7 @@ https://github.com/f4b6a3/ulid-creator scm:git:ssh://git@github.com/f4b6a3/ulid-creator.git scm:git:ssh://git@github.com/f4b6a3/ulid-creator.git - ulid-creator-3.0.1 + HEAD diff --git a/src/main/java/com/github/f4b6a3/ulid/Ulid.java b/src/main/java/com/github/f4b6a3/ulid/Ulid.java index b2cf1ce..8c0563a 100644 --- a/src/main/java/com/github/f4b6a3/ulid/Ulid.java +++ b/src/main/java/com/github/f4b6a3/ulid/Ulid.java @@ -616,6 +616,8 @@ public final class Ulid implements Serializable, Comparable { * A valid ULID string is a sequence of 26 characters from Crockford's base 32 * alphabet. * + * The first character of the input string must be between 0 and 7. + * * @param chars a char array * @return boolean true if valid */