Details
Description
When using lambda to implement a jax-rs StreamingOutput we get a no message body writer found error.
However if we use an anonymous class instead of the lambda then it works.
This happens because CXF uses the spring method ClassUtils.isCglibProxyClass() for detecting cglib classes. However that method is not strict enough and incorrectly marks every lambda class as cglib as well. This causes CXF to get the superclass which will always be Object.class for which there is no message body writer.
According to the feedback received on the spring project instead of ClassUtils.isCglibProxyClass() (which got deprecated) people should use other methods, for example AopUtils.isCglibProxy() which is more strict.
Attachments
Issue Links
- is related to
-
CXF-7229 ClassHelper usages not replacable by ClassUnwrapper
- Closed
- links to