Description
org.apache.cxf.jaxrs.impl.ProvidersImpl.getMessageBodyReader and org.apache.cxf.jaxrs.impl.ProvidersImpl.getMessageBodyWriter are public methods that can be invoke by end user via injected providers.getMessageBodyReader(x,null,x,x).
Recently we received TCK failure(NPE) on invoke above method when the Type genericType is null.
the stack trace is:
at java.lang.Class.isAssignableFrom(Native Method)
at org.apache.cxf.jaxrs.provider.JAXBElementProvider.objectFactoryOrIndexAvailable(JAXBElementProvider.java:109)
at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.objectFactoryForType(AbstractJAXBProvider.java:584)
at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.isSupported(AbstractJAXBProvider.java:570)
at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.isReadable(AbstractJAXBProvider.java:440)
at org.apache.cxf.jaxrs.provider.ProviderFactory.chooseMessageReader(ProviderFactory.java:845)
at org.apache.cxf.jaxrs.provider.ProviderFactory.createMessageBodyReader(ProviderFactory.java:504)
at org.apache.cxf.jaxrs.impl.ProvidersImpl.getMessageBodyReader(ProvidersImpl.java:45)
How do you think the value of genericType is null? Is it valid or not. If not we may challenge the TCK case. However the NPE is not allowed.