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

BeanDeserializerBase (2.6.0 regression): only update creatorProps with CreatorPropertys #881

Merged
merged 1 commit into from
Jul 29, 2015

Conversation

dharaburda
Copy link
Contributor

It looks like the fix to issue [#795] introduced a bug as illustrated by the test case. An ArrayStoreException occurs when attempting to assign an ObjectIdReferenceProperty to the creatorProps array, understandably. Others have mentioned this on a similar (but I believe un-related) issue here and here.

Doing something like Arrays.copyOf(...) when the CreatorProperty array is returned from the value instantiator here prevents the ArrayStoreException but seems to cause downstream problems. Only updating creatorProps with an actual CreatorProperty seems reasonable to me but I am not super familiar with jackson internals.

@cowtowncoder
Copy link
Member

Thank you for investigating this, proposing a fix. I agree in that the problem exists, but will need to see what are the consequences, and whether changing of type (of SettableProperty) would make most sense or not (that is, is CreatorProperty a true requirement).

I think the best way is probably for me to use the test case first, then work on verifying the fix.

cowtowncoder added a commit that referenced this pull request Jul 29, 2015
BeanDeserializerBase (2.6.0 regression): only update creatorProps with CreatorPropertys
@cowtowncoder cowtowncoder merged commit ed98f34 into FasterXML:master Jul 29, 2015
@cowtowncoder
Copy link
Member

Ok; I solved the problem in reverse way, by actually removing dependency to CreatorProperty for the most part; all tests now pass, including new one.
With 2.7 the property handling system is planned to be rewritten once again, since creator properties are currently merged too late for some annotations to take effect; but until then this will have to do.

@cowtowncoder cowtowncoder added this to the 2.6.1 milestone Jul 29, 2015
@dharaburda
Copy link
Contributor Author

Thanks once again for quick resolution -- looking forward to 2.6.1 😄

@cowtowncoder
Copy link
Member

Thank you for reporting this and offering the patch!
Hoping to get 2.6.1 out quite soon as well -- a few issues reported, fixed, should allow much smoother upgrade from earlier versions.

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.

2 participants