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

Improve validation in uuid unmarshaller #2569

Merged
merged 1 commit into from Jul 8, 2019

Conversation

@Philippus
Copy link
Contributor

commented Jun 11, 2019

Purpose

Improve the validation in the uuid unmarshaller.

References

Follows #2505 which introduced the unmarshaller.

Changes

Uses a regex that accepts uuid's as defined in RFC 4122. A special case is added for the nil uuid. Also avoids a try/catch block.

Background Context

The validation in UUID.fromString-method in java 8 is pretty poor and accepts a lot of invalid uuid strings, java 9 improves on it somewhat but is still far too accepting.

@akka-ci akka-ci added validating tested and removed validating labels Jun 11, 2019

@akka-ci

This comment has been minimized.

Copy link
Collaborator

commented Jun 11, 2019

Test PASSed.

@johanandren
Copy link
Member

left a comment

LGTM

@raboof
Copy link
Member

left a comment

LGTM, one improvement to consider

@Philippus Philippus force-pushed the Philippus:improve-uuid-unmarshaller branch from ab49063 to 6d9eeee Jul 4, 2019

@akka-ci

This comment has been minimized.

Copy link
Collaborator

commented Jul 4, 2019

Test PASSed.

@Philippus Philippus force-pushed the Philippus:improve-uuid-unmarshaller branch from 6d9eeee to 3c7b573 Jul 7, 2019

@akka-ci

This comment has been minimized.

Copy link
Collaborator

commented Jul 7, 2019

Test PASSed.

@raboof

raboof approved these changes Jul 8, 2019

@raboof raboof merged commit 3bd6df9 into akka:master Jul 8, 2019

4 checks passed

Jenkins PR Auto-Formatter Successful
Details
Jenkins PR Validation Test PASSed. 4147 tests run, 1074 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
typesafe-cla-validator All users have signed the CLA
Details

@raboof raboof added this to the 10.1.9 milestone Jul 8, 2019

@Philippus Philippus deleted the Philippus:improve-uuid-unmarshaller branch Jul 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.