|
I had a problem because I miswrote my constraint
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy={CancellationCode.StringValidator.class})
public @interface CancellationCode {
String message() default "org.jboss.jdf.example.ticketmonster.model.CancellationCode.message";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
Note the missing {} around the message default key.
We might want to detect that in the annotation processor by checking the following pattern:
-
long ish without space
-
dots
-
no {} around
|