No validator could be found when constraint is on interface

Description

I get the following message when I try to run the sample project in the attachments:

HV000030: No validator could be found for constraint 'test.TestConstraint' validating type 'test.ModelTypeInterface'. Check configuration for ''

Aren't constraints supposed to be inherited? This is an issue with libraries like http://immutables.org because implementation classes are generated, so I can only add constraints to super types.

Environment

Java9

Attachments

1

Activity

Leandro de OliveiraNovember 12, 2018 at 2:14 PM

That did the trick, thanks.

Guillaume SmetNovember 12, 2018 at 1:56 PM

You declare your validator as validating ModelType whereas your constraint is on ModelTypeInterface.

You need to make your validator validate ModelTypeInterface or it won't work.

Rejected

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

Guillaume Smet
Leandro de Oliveira

Affects versions

Priority

Created November 12, 2018 at 1:38 PM
Updated November 13, 2018 at 1:11 PM
Resolved November 13, 2018 at 1:11 PM