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

Axon 3.1: use of Collection instead of Iterable in AggregateMemberAnnotatedChildEntityCollectionDefinition #461

Closed
corona-it opened this issue Dec 20, 2017 · 4 comments
Assignees
Labels
Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. Status: Resolved Use to signal that work on this issue is done. Type: Bug Use to signal issues that describe a bug within the system.
Milestone

Comments

@corona-it
Copy link

In the protected method resolveEventTargets in the class AggregateMemberAnnotatedChildEntityCollectionDefinition.java the result of ReflectionUtils.getFieldValue(field, parentEntity) (line 89) should be assigned to an Iterable instead of a Collection

@smcvb
Copy link
Member

smcvb commented Dec 20, 2017

Did you have some exceptions occur with it being a set to a Collection @corona-it?

@corona-it
Copy link
Author

yes, I get a ClassCastException if I upgrade from 3.0.7 to 3.1. This is because we use vavr collections

@abuijze abuijze added this to the Release 3.1.1 milestone Dec 20, 2017
@abuijze abuijze added the Type: Bug Use to signal issues that describe a bug within the system. label Dec 20, 2017
@abuijze
Copy link
Member

abuijze commented Dec 20, 2017

Hi @corona-it, thanks for reporting it. You beat me to it ;-)

@smcvb, the issue is that the AggregateMemberAnnotatedChildEntityCollectionDefinition kicks in when the declared field is an Iterable, but when accessing the field contents, at runtime, it casts to a Collection. Since @corona-it uses Vavr collections (which implement Iterable, but not Collection) in the project, it causes a ClassCastException.

@abuijze abuijze self-assigned this Dec 20, 2017
abuijze added a commit that referenced this issue Dec 20, 2017
@smcvb
Copy link
Member

smcvb commented Dec 21, 2017

I understand the issue, I just wanted to hear the situation which caused the exception @corona-it was experiencing.

I think it's valuable to have that information in the bug ticket here.
Already had the fix pending locally, but then you beat me to that, @abuijze ;-)

Thanks for reporting this @corona-it!

@smcvb smcvb closed this as completed Dec 21, 2017
@smcvb smcvb added Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. Status: Resolved Use to signal that work on this issue is done. labels Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. Status: Resolved Use to signal that work on this issue is done. Type: Bug Use to signal issues that describe a bug within the system.
Projects
None yet
Development

No branches or pull requests

3 participants