Resource returns an Incorrect content type in Java 9
I have a resource subclass that provides HTML and JSON representations using @Get("html") and @Get("json") annotations. In Java 8, the correct representation is returned based on the value of the Accept header. In Java 9, the Accept header is not respected and HTML is always returned.
I've assembled a minimal Restlet 2.3.10 JSE application to demo this: https://github.com/adolski/restlet-jdk9-issue
Hi @adolski
I see that the value of this annotation @Get("json") is "json" using JDK9 and not json...
Issue is located on class AnnotationUtils, at line 139
I'm having exactly the same issue. In a subclass of org.restlet.resource.ServerResource I have two methods taking care of two different content types, @Get("html") and @Get("json") respectively. On Java 8 everything works fine, but with Java 10 the content negotiation through annotations stopped working.
I'm using Restlet 2.3.12, is there any branch or new release where this has been fixed?
I'm using Restlet 2.3.12, is there any branch or new release where this has been fixed?
I just found out that 2.4.1 contains the fix. On the web site 2.3.12 is as of today still listed as the latest stable release.