-
Bug
-
Resolution: Done
-
Major
-
3.0.14.Final
-
None
-
None
I have a testcase which is based on org.jboss.resteasy.test.validation.TestValidationExceptions from upstream testsuite, but modified to run under EAP7 .
I have following resource:
@Path("/") public class ValidationExceptionSubResourceWithInvalidOverride extends ValidationExceptionSuperResource { @POST public void test(@Size(max = 3) String s) { } }
@Path("/") public class ValidationExceptionSuperResource { @POST public void test(String s) { } }
The client sends:
Response response = client.target(generateURL("/",DECL_EXCEPTION)).request().post(null);
Then the server returns in the body response entity with content:
javax.validation.ConstraintDeclarationException: HV000151: A method overriding another method must not alter the parameter constraint configuration, but method public void org.jboss.resteasy.test.validation.resource.ValidationExceptionSubResourceWithInvalidOverride.test(java.lang.String) changes the configuration of public void org.jboss.resteasy.test.validation.resource.ValidationExceptionSuperResource.test(java.lang.String).
and correctly sets "validation-exception" header to true.
But the status code of the response is 204.
According to rfc2616 the response with 204 code 'must not' include message body, which in this case does and as Validation exception was thrown, so the http response code should be 500 as it is for other Validation exceptions (ConstraintDefinitionException for example)
htt
- is cloned by
-
JBEAP-3459 Log warning message if two end-points are conflicting on the same path
- Verified