Wrong constraint validator type resolution in case of constraint placed on parameterized type in class hierachy

Description

there is a difference in the processing of raw type and <?> type.
here is my use case :

With:

everything works fine, though when:

I get the following exception :

workaround :

  • do not use @Inherited annotation

  • use @SuppressWarnings("rawtypes") instead of inferring <?>

Environment

None

Activity

Mathieu LachanceNovember 1, 2012 at 6:12 PM

Yes Gunnar I'm using the validate method as followed :

HibernateValidatorConfiguration configuration = Validation.byProvider(HibernateValidator.class).configure();
ValidatorFactory factory = configuration.failFast(true).buildValidatorFactory();
Validator failFastHibernateValidator = factory.getValidator();
failFastHibernateValidator.validate(new IntegerSettingValue());

Gunnar MorlingNovember 1, 2012 at 5:02 PM

Mathieu, thanks for this report.

One question though: What is the actual validation call you're doing, so what object do you pass to Validator#validate()? Could you maybe add a test case showing the problem?

Fixed

Details

Assignee

Reporter

Bug Testcase Reminder (view)

Bug reports should generally be accompanied by a test case!

Bug Testcase Reminder (edit)

Bug reports should generally be accompanied by a test case!

Participants

Gunnar Morling
Hardy Ferentschik
Mathieu Lachance

Components

Affects versions

Priority

Created October 24, 2012 at 4:22 PM
Updated November 29, 2012 at 5:30 PM
Resolved November 2, 2012 at 4:29 PM