Bug 1029842 - [GSS] (6.4.z) Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints
Summary: [GSS] (6.4.z) Only the root method of an overridden method in an inheritance ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: RESTEasy
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: CR1
: EAP 6.4.18
Assignee: Petr Jurak
QA Contact: Katerina Odabasi
URL:
Whiteboard:
Depends On:
Blocks: eap6418-payload 1492658
TreeView+ depends on / blocked
 
Reported: 2013-11-13 11:00 UTC by Takayuki Konishi
Modified: 2020-12-11 11:38 UTC (History)
14 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-12-06 18:29:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RESTEASY-1101 0 Major Closed Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints 2018-04-12 13:12:29 UTC
Red Hat Issue Tracker RESTEASY-923 0 Major Closed Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints 2018-04-12 13:12:29 UTC
Red Hat Knowledge Base (Solution) 541143 0 None None None Never

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.


Note You need to log in before you can comment on or make changes to this bug.