Hi Andy
On 01/11/16 15:50, Andy McCright wrote:
Hi All,
When we moved to 3.1.7 a few months ago, we started seeing a test failure
in one of our system tests. The tester had a JAX-RS resource with the
following method signature:
@GET
@Produces(MediaType.APPLICATION_JSON)
public JSONObject getMessage(@QueryParam("id") int i, @Suspended
AsyncResponse async)
Prior to 3.1.7, this method could be invoked and would return a 200
response with a JSON message. After the upgrade, the same request results
in a 405 response, and no warning message.
When I read the javadoc text for the @Suspended annotation (
http://docs.oracle.com/javaee/7/api/javax/ws/rs/container/Suspended.html ),
it makes me think that the method should be available (and requests should
still succeed), but that the return value of the method should be ignored.
I also think we should be logging a warning rather than a fine message.
Does that sound good? If no objections, I'll plan to open a JIRA and
provide a patch.
I agree it should be a warning instead of a fine message.
However I'm not sure what we will achieve by keeping such method
candidates. The developer who writes this code will expect the value be
returned to the user but the test validating that some value is returned
will fail anyway.
Thus such methods can only add to the cost of the selection process if
they are added to the list of the candidates and will confuse the users
(ex, suspended GET will be still supported but the GET user will
eventually get an empty page...).
Can you see any practical scenarios where keeping such method candidates
can you actually make these methods work ?
Thanks, Sergey
Thanks, Andy