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

JsonBindingProvider does not use available genericType info when writing to outputstream #3702

Open
jerseyrobot opened this issue Oct 18, 2017 · 3 comments
Labels
Component: extensions Provider question Further information is requested
Milestone

Comments

@jerseyrobot
Copy link
Contributor

When trying to write a simple generic entity (Widget) to json I get the warning: Generic bound not found for type T declared in class Widget. I would expect that if I wrap the Widget in a GenericEntity<Widget> that the generic type information that is passed in to the MessageBodyWriter#writeTo method implemented in JsonBindingProvider would be passed on the the jsonb#toJson method as so: jsonb.writeTo(obj, genericType). That doesnt seem to be the case, as JsonBindingProvider ignores the generic type parameter altogether. Perhaps this is the intented behavior, but some clarification would be nice. I am also curious as to why these 2 lines were used:
entityStream.write(jsonb.toJson(o).getBytes(AbstractMessageReaderWriterProvider.getCharset(mediaType))); entityStream.flush();

instead of using:
jsonb.toJson(o, genericType, entityStream);

@jerseyrobot
Copy link
Contributor Author

@etay2000 Commented
I'm not going to hold my breath on this getting resolved any time soon, but if I am not mistaken, it looks like the last time any issue was assigned to anyone was September 21. Is @pavelbucek the only person available and or responsible for resolving Jersey issues?

@jerseyrobot
Copy link
Contributor Author

@etay2000 Commented
Any updates?

Any word on the 2.27 milestone?

Thanks for adding the labels. That must have been time consuming because I noticed you guys have taken a 26 day break from any activity after that.

@jerseyrobot
Copy link
Contributor Author

@jerseyrobot jerseyrobot added Component: extensions Provider question Further information is requested labels Apr 20, 2018
@jerseyrobot jerseyrobot added this to the 2.27 milestone Apr 20, 2018
dansiviter added a commit to dansiviter/jersey that referenced this issue Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: extensions Provider question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant