BeanMetaDataImpl.BeanMetaDataBuilder#build() can choose ConstraintMetaData w/o constraints

Description

org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData.Builder.add(ConstrainedElement)

Correct comment but incorrect if() expression. It is necessary to change the parameters of the function overrides() in places.

As a result, there are cases when the meta data collected from the class does not contain all the specified constaints. And the situation can change from run to run and depends on in which order the BeanMetaDataImpl<T>.BeanMetaDataBuilder.build() iterates Set <BuilderDelegate> builders and adds to Set<ConstraintMetaData> aggregatedElements.

Attachment contains example of the hierarchy on which this issue occurs.

Environment

None

Assignee

Marko Bekhta

Reporter

Alexander Korsukov

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Blocker
Configure