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

@Philippus Philippus 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 PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed validating PR that is currently being validated by Jenkins labels Jun 11, 2019
@akka-ci
Copy link

akka-ci commented Jun 11, 2019

Test PASSed.

Copy link
Member

@johanandren johanandren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one improvement to consider

@Philippus Philippus force-pushed the improve-uuid-unmarshaller branch from ab49063 to 6d9eeee Compare July 4, 2019 09:07
@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR that is currently being validated by Jenkins labels Jul 4, 2019
@akka-ci
Copy link

akka-ci commented Jul 4, 2019

Test PASSed.

@Philippus Philippus force-pushed the improve-uuid-unmarshaller branch from 6d9eeee to 3c7b573 Compare July 7, 2019 20:28
@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR that is currently being validated by Jenkins labels Jul 7, 2019
@akka-ci
Copy link

akka-ci commented Jul 7, 2019

Test PASSed.

@raboof raboof merged commit 3bd6df9 into akka:master Jul 8, 2019
@raboof raboof added this to the 10.1.9 milestone Jul 8, 2019
@Philippus Philippus deleted the improve-uuid-unmarshaller branch July 16, 2019 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants