eclipse / lyo

Eclipse Lyo, a Java SDK for OSLC-based tool integration

Home Page:https://oslc.github.io/developing-oslc-applications/eclipse_lyo/eclipse-lyo.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OslcXmlProvider / OslcRdfXmlProvider always returns true for method "isReadable"

jhemm2 opened this issue · comments

In the OslcRdfXmlProvider hence also in the OslcXmlProvider the isReadable method always returns true.
This makes it impossible to use another XML Messagebody reader.

isReadable method should be implemented correctly, e.g.:

`    @Override
    public boolean isReadable(final Class<?> type, final Type genericType, final Annotation[] annotations,
            final MediaType mediaType) {
        return isReadable(type, mediaType, OslcMediaType.APPLICATION_RDF_XML_TYPE, OslcMediaType.APPLICATION_XML_TYPE,
                OslcMediaType.TEXT_XML_TYPE, OslcMediaType.TEXT_TURTLE_TYPE);
    }`

Thank you for your report, @jhemm2, and a suggested fix. Would you be able to make a pull request, please? Also, do we need to do the same fix in other classes?