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

Discard persisted events with non-nullary constructors #599

Merged
merged 3 commits into from Sep 11, 2020

Conversation

tcard
Copy link
Contributor

@tcard tcard commented Sep 4, 2020

Fixes #598.

It also fixes a bug, discovered while testing, by which we weren't persisting pending events until some later event caused a transition.

@tcard tcard self-assigned this Sep 4, 2020
Copy link
Member

@paddybyers paddybyers left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

ActivationStateMachine.Event event = eventClass.newInstance();
ActivationStateMachine.Event event;
try {
event = eventClass.newInstance();
Copy link
Member

Choose a reason for hiding this comment

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

You wouldn't prefer an isPersisted() or something on the event?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@paddybyers All of them are about to become persistent when #546 is fixed, so we'd then have to find another way to detect "old" persisted stated.

@tcard
Copy link
Contributor Author

tcard commented Sep 11, 2020

Screenshot 2020-09-11 at 09 13 00

@tcard tcard merged commit abe2823 into main Sep 11, 2020
@tcard tcard deleted the feature/598-discard-persisted-events branch September 11, 2020 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Restoral of ActivationStateMachine events fails because not all event types have a no-argument constructor
2 participants