Bug 1029842

Summary: [GSS] (6.4.z) Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Takayuki Konishi <tkonishi>
Component: RESTEasyAssignee: Petr Jurak <pjurak>
Status: CLOSED CURRENTRELEASE QA Contact: Katerina Odabasi <kanovotn>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: bmaxwell, cdewolf, fnasser, howardmoon, jbilek, kanovotn, kkhan, klape, pjurak, tasato, thofman, tmiyargi, weli, wsiqueir
Target Milestone: CR1Keywords: Reopened
Target Release: EAP 6.4.18   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-06 18:29:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1463709, 1492658    

Description Takayuki 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

Comment 1 Takayuki Konishi 2013-11-13 11:02:49 UTC
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 12 JBoss JIRA Server 2014-08-21 22:22:04 UTC
Ron Sigal <ron.sigal> updated the status of jira RESTEASY-923 to Resolved

Comment 13 JBoss JIRA Server 2014-08-21 22:22:20 UTC
Ron Sigal <ron.sigal> updated the status of jira RESTEASY-923 to Closed

Comment 39 Petr Penicka 2017-12-06 18:29:28 UTC
Released on Nov 14 2017 as part of EAP 6.4.18.