We're updating the issue view to help you get more done. 

Annotation processor is not aware of new constraint @Currency and validators for type MonetaryAmount

Description

When using hibernate-validator-annotation-processor (5.4.0) at compile time, I have the following errors :

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] .../Invoice.java:[17,5] The annotation @Currency is disallowed for this data type.
[ERROR] .../Invoice.java:[16,5] The annotation @DecimalMax is disallowed for this data type.
[INFO] 2 errors

I used this annotations in a POJO :

@DecimalMax("1000.00")
@Currency("EUR")
private MonetaryAmount totalAmount;

I tested it with Java Money API (JSR-354) and Java 8 :

<dependency>
<groupId>javax.money</groupId>
<artifactId>money-api</artifactId>
<version>1.0.1</version>
</dependency>

I suppose that the constraint has not been registered in the class org.hibernate.validator.ap.util.TypeNames.HibernateValidatorTypes and org.hibernate.validator.ap.util.ConstraintHelper.

Environment

Java 8 + JSR-354

Status

Assignee

Guillaume Smet

Reporter

Guillaume Husta

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

5.4.0.Final

Priority

Major