-
Bug
-
Resolution: Done
-
Major
-
3.0.14.Final
-
None
Let there be a JAX-RS resource which is a stateless EJB and has a field-level Bean Validation constraint:
@Path("/hikes") @Stateless public class HikeResource { @NotNull private String name; public String getName() { return name; } @POST @Path("/createHike") @Consumes("application/json") @Produces({"application/json", "text/plain"}) public void createHike(@Min(1) long id, String from, String to) { // nothing to do } }
The @Null constraint on the "name" field will not be validated upon invocation of the createHike() resource method. When removing the Stateless annotation, the constraint is validated as expected.
This affects only classic bean validation constraints (fields, properties, class-level); The method parameter constraint @Min is validated in both cases.
- is related to
-
RESTEASY-1749 Method Parameters are only validated on first invocation of an ejb managed rest endpoint
- Resolved