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

OslcXmlProvider / OslcRdfXmlProvider always returns true for method "isReadable" #226

Open
jhemm2 opened this issue Dec 14, 2021 · 2 comments
Milestone

Comments

@jhemm2
Copy link
Contributor

jhemm2 commented Dec 14, 2021

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);
    }`
@berezovskyi
Copy link
Contributor

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?

@berezovskyi berezovskyi added this to the 5.0 milestone Dec 21, 2021
@jhemm2 jhemm2 changed the title OslcXmlProvider / OslcRdfXmlProvider always returns is readable = true OslcXmlProvider / OslcRdfXmlProvider always returns true for method "isReadable" Dec 22, 2021
jhemm2 added a commit to jhemm2/lyo that referenced this issue Dec 22, 2021
jhemm2 added a commit to jhemm2/lyo that referenced this issue Dec 22, 2021
jhemm2 added a commit to jhemm2/lyo that referenced this issue Dec 22, 2021
…slcRdfXmlProvider_always_returns_is_readable
jhemm2 added a commit to jhemm2/lyo that referenced this issue Dec 22, 2021
- check for OSLC Resource Shape
- check if assignable
- added tests
@berezovskyi berezovskyi modified the milestones: 5.0, 5.x Jun 30, 2023
@berezovskyi berezovskyi modified the milestones: 5.x, 7.x Aug 11, 2023
@berezovskyi
Copy link
Contributor

@jhemm2 do you consider this fixed by #286 and #288?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants