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

Fixed #589 (by adding skipObject() and skipArray() methods) #590

Merged
merged 4 commits into from Mar 31, 2023

Conversation

greek1979
Copy link
Contributor

A fix for a straightforward issue #589 discovered by @DXTR66. The fix is about letting JsonStructureToParserAdapter parser adapter implement skipObject() and skipArray() methods, so both can be used by the caller without a fear of raising an unsupported-method-exception.

@greek1979
Copy link
Contributor Author

greek1979 commented Feb 20, 2023

After another, related issue was brought up on Friday, had to revisit the original patch, debug new issue extensively, and find a better solution that resolves both the original unmapped-property-in-polymorphic-object and multiple-nested-polymorphic-objects bugs.

The root cause for the latter was the same JsonStructureToParserAdapter parser adapter that was violating the contract for jakarta.json.stream.JsonParser.getObject() method, which is "Returns a JsonObject and advances the parser to the corresponding END_OBJECT". But the adapter did not advance the internal JSON object parser to the end of current object, so after the caller was done with deserialization of nested (child) object, the adapter knew nothing about it, and attempted to proceed with existing key-iterator like nothing happened. Triggering a deserialization error, of course.

@greek1979 greek1979 force-pushed the jsonstruct-parser-skip-methods branch from a387d9f to bbcf8f2 Compare February 20, 2023 10:23
@remimarechal
Copy link

This PR fixes my issues #592

@Verdent
Copy link
Member

Verdent commented Feb 24, 2023

Please, rebase on the latest master. I made fixes for copyright issues, you are encountering here. (You might need to change some of the copyrights yourself, but only for files, you have changed) :-)

@greek1979 greek1979 force-pushed the jsonstruct-parser-skip-methods branch from 1ec4fd9 to 3c78ff7 Compare February 24, 2023 18:59
@greek1979
Copy link
Contributor Author

@Verdent , thank you for pointing this out. Updated copyright year to 2023 for the files I have touched with my commits, rebased, and pushed to the feature branch. Should be ok now.

@redmitry
Copy link

redmitry commented Mar 1, 2023

sorry for duplicating:
#595

@Verdent Verdent merged commit f3cbb35 into eclipse-ee4j:master Mar 31, 2023
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.

None yet

4 participants