It's a similar situation when declaring validators in XML. In theory the check could be made working for both cases: we'd need a way to convey the applied constraint mapping files as well as the applied programmatic mappings, though, to the annotation processor. For XML it's rather easy, but the API case would be an interesting challenge, as we'd need a symbolic execution of the mappings to determine the validators. I don't think the effort would be justified, though. So we could either remove the check altogether or add a processor option to optionally turn it off. I'd go for the latter, as it'd allow to keep the check for the more common case of annotation based configuration. |