Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support validating UUIDs including the nil UUID #538

Closed
sleberknight opened this issue Apr 9, 2021 · 0 comments · Fixed by #543
Closed

Support validating UUIDs including the nil UUID #538

sleberknight opened this issue Apr 9, 2021 · 0 comments · Fixed by #543
Assignees
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Milestone

Comments

@sleberknight
Copy link
Member

While UUIDs#isValidUUID does not support the nil UUID, we should add a variant that does consider nil UUIDs be be valid.

For example:

    private static final String NIL_UUID = "00000000-0000-0000-0000-000000000000";

   // ...

    public static boolean isValidUUIDAllowingNil(String value) {
        return NIL_UUID.equals(value) || isValidUUID(value);
    }
@sleberknight sleberknight added the new feature A new feature such as a new class, method, package, group of classes, etc. label Apr 9, 2021
@sleberknight sleberknight modified the milestones: 0.22.0, 0.23.0 Apr 9, 2021
chrisrohr added a commit that referenced this issue Apr 13, 2021
sleberknight added a commit that referenced this issue Apr 13, 2021
* Add support for validating NIL UUIDs

Closes #538 

Co-authored-by: Scott Leberknight <174812+sleberknight@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants