-
Notifications
You must be signed in to change notification settings - Fork 340
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
JsonBindingProvider.writeTo() Failed to Process Polymorphic Object #5125
Comments
thanks for the report! Could you please provide a reproducer? |
Sorry for the late response, Here is the simple reproducer https://github.com/arieki/jersey-reproducer |
I will submit a PR for the fixing ASAP |
Hi @arieki I am testing this in master and tests are passing. Here is the test:
|
Glassfish 6.2.5 with Jersey 3.0.8 (and Jackson jackson-module-jakarta-xmlbind-annotations-2.13.3.jar added - required by Jersey Jackson modules), reproduced:
Either Jersey fixed that, or it's a bug in Payara (Payara builds Jersey from their repository for some reason) |
this PR #5047 breaks the polymorphic behaviour.
I found a problem when the object is polymorphism, the JSON object won't be written into the
entityStream
.When the object is polymorphism it will have a parent class type as
genericType
value which causes theentityStream
is not written correctly which makes theentityStream
value = {}.jsonb.toJson(object, type, writer)
will only write the object intoentityStream
if theobject
has equal class type withtype
parameterThe text was updated successfully, but these errors were encountered: