We're updating the issue view to help you get more done. 

TypeAnnotationAwareMetaDataProvider does not resolve generic field types with type parameters

Description

Consider the following domain model:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 public abstract class AbstractCompanyRepresentation<T extends UpdateAddressRepresentation> { private T address; public T getAddress() { return address; } public void setAddress(T address) { this.address = address; } } public class CompanyCreateRepresentation extends AbstractCompanyRepresentation<CreateAddressRepresentation> { } public class UpdateAddressRepresentation { private String street; public String getStreet() { return street; } public void setStreet(String street) { this.street = street; } } public class CreateAddressRepresentation extends UpdateAddressRepresentation { @NotNull @Override public String getStreet() { return super.getStreet(); } }

The following fails to resolve the contraints annotated in CreateAddressRepresentation.class:

1 2 org.hibernate.validator.internal.metadata.provider.TypeAnnotationAwareMetaDataProvider provider = ...; provider.getBeanConfigurationForHierarchy(CompanyCreateRepresentation.class);

Environment

None

Status

Assignee

Unassigned

Reporter

Moritz Becker

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Affects versions

6.0.10.Final

Priority

Major