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

Permit UUID by default #223

Merged
merged 2 commits into from
Jan 14, 2022
Merged

Conversation

tsg21
Copy link
Contributor

@tsg21 tsg21 commented Jan 13, 2022

Make DefaultInvocationSerializer permit java.util.UUID

Fixes #217

Comment on lines -132 to -134
addClassPair(Float.class, "Float");
addClassPair(Float.class, "Float");
addClassPair(Float.class, "Float");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note the duplication here, this has been removed.

@@ -125,41 +128,44 @@ public Invocation deserializeInvocation(Reader reader) {
addClassPair(boolean.class, "boolean");
addClassPair(char.class, "char");

addClassPair(Byte.class, "Byte");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's no need to duplicate the class simple name like this. Just get it from the class directly.

addClass(ChronoUnit.class);

addClass(Transaction.class);
addClass(TransactionContextPlaceholder.class);
Copy link
Contributor

Choose a reason for hiding this comment

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

That differs from addClassPair(TransactionContextPlaceholder.class, "TransactionContext");, is it ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good spot! I went through them and failed on the last line. I will undo that - I don't have an interest in accidentally altering behaviour here - the old name might be persisted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Reverted to the old name for this one.

@badgerwithagun badgerwithagun merged commit 7fdac33 into gruelbox:master Jan 14, 2022
@badgerwithagun
Copy link
Member

Thanks @tsg21. Merged :)

badgerwithagun pushed a commit that referenced this pull request May 14, 2023
* Allow java.util.UUID as one of the types that are allowed for serialization by default.

* Revert unintended behaviour change.

(cherry picked from commit 7fdac33)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DefaultInvocationSerializer does not allow java.util.UUID
3 participants