Skip to content

Commit

Permalink
Log info when using legacy annotations style
Browse files Browse the repository at this point in the history
  • Loading branch information
jirutka committed Aug 26, 2014
1 parent 49c380c commit 9490466
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void initialize(Annotation eachAnnotation) {

descriptors = unmodifiableList(asList(descriptor));

// legacy
// legacy and deprecated, will be removed in next major version!
} else if (isWrapperAnnotation(eachAType)) {
Annotation[] constraints = unwrapConstraints(eachAnnotation);
Validate.notEmpty(constraints, "%s annotation does not contain any constraint", eachAType);
Expand All @@ -109,6 +109,9 @@ public void initialize(Annotation eachAnnotation) {
descriptors = unmodifiableList(list);
earlyInterpolation = true;

LOG.info("You're using legacy @EachX annotation style, this will be removed soon! " +
"Please update your @EachX annotations.");

} else {
throw new IllegalArgumentException(String.format(
"%s is not annotated with @EachConstraint and doesn't declare 'value' of type Annotation[] either.",
Expand Down

0 comments on commit 9490466

Please sign in to comment.