Make the Hibernate Validator annotation processor aware of the new locations where constraints can be specified

Description

The annotation processor should apply sensible compile-time checks to report any issues with constraints given via type annotations. E.g. the following should cause an error to be reported as the @Email constraint is not supported for Number:

Environment

None

Activity

Show:
Gunnar Morling
August 11, 2014, 9:45 AM
Edited

As it turns out, annotations on type uses are not accessible through the JSR 269 API. There is a thread on the compiler-dev list which discusses the creation of the required API: http://mail.openjdk.java.net/pipermail/compiler-dev/2014-May/008756.html.

An alternative may be to look into the "Checker Framework" and see how it could be used for our purposes. But likely that'd require the user to work with two tools (the existing AP and the Checker Framework) which seems not really desirable. It thus might make sense to wait until the required APIs have been established in JSR 269.

Also see our discussion on IRC, starting at 9:07.

Gunnar Morling
July 5, 2017, 10:58 PM

just seeing this issue relating to our recent discussion. Seems it's not doable at least in Java 8. Would be worth checking whether things changed in Java 9.

Assignee

Khalid Alqinyah

Reporter

Gunnar Morling

Labels

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

Yes, likely

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Minor
Configure