DescriptionTakayuki Konishi
2013-11-13 11:00:40 UTC
Created attachment 823343[details]
reproducer
Description of problem:
I've reproduced RESTEASY-923 on EAP 6.1.0. When a parameter on parent class is annotated as @NotNull and call subclass's method, ConstraintDeclarationException occurs.
How reproducible: 100 %
Steps to Reproduce:
1. Download and extract attached helloworld-rs.zip
2. Run eap 6.1.0
3. $ cd helloworld-rs
4. $ mvn package jboss-as:deploy
5. $ curl -d email=foo -d password=bar http://localhost:8080/jboss-as-helloworld-rs/rest/user/
Actual results:
ConstraintDeclarationException occurs
Expected results:
"!!org.jboss.as.quickstarts.bean_validation.model.User {email: hoge, password: fuga}" is outputted.
Additional info:
It also reproduced on EAP 6.2.0.Beta1
If I add @NotNull on subclass's methond, it works well.
@Path("/user")
public interface UserResource {
@ValidateRequest
@POST
@Path("/")
User register(@FormParam("email") String email,
@FormParam("password") String password)
throws EmailAleadyRegisteredException;
}
@Stateless
public class UserResourceImpl implements UserResource {
@Override
public User register(@NotNull String email, String password)
throws EmailAleadyRegisteredException {
return new User(email, password);
}
}
Comment 12JBoss JIRA Server
2014-08-21 22:22:04 UTC
Ron Sigal <ron.sigal> updated the status of jira RESTEASY-923 to Resolved
Comment 13JBoss JIRA Server
2014-08-21 22:22:20 UTC
Ron Sigal <ron.sigal> updated the status of jira RESTEASY-923 to Closed