Skip to content

Commit c525a75

Browse files
authored
Set Source Retention where needed (#227)
1 parent 46f451d commit c525a75

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

validator/src/main/java/io/avaje/validation/ImportValidPojo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import static java.lang.annotation.ElementType.MODULE;
44
import static java.lang.annotation.ElementType.PACKAGE;
55
import static java.lang.annotation.ElementType.TYPE;
6-
import static java.lang.annotation.RetentionPolicy.CLASS;
6+
import static java.lang.annotation.RetentionPolicy.SOURCE;
77

88
import java.lang.annotation.Retention;
99
import java.lang.annotation.Target;
@@ -12,7 +12,7 @@
1212
* Specify external types for which to generate Valid Adapters. Use when you can't place a @Valid
1313
* annotation on an external type (such as a mvn/gradle dependency).
1414
*/
15-
@Retention(CLASS)
15+
@Retention(SOURCE)
1616
@Target({TYPE, PACKAGE, MODULE})
1717
public @interface ImportValidPojo {
1818

validator/src/main/java/io/avaje/validation/adapter/ConstraintAdapter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
package io.avaje.validation.adapter;
22

33
import static java.lang.annotation.ElementType.TYPE;
4+
import static java.lang.annotation.RetentionPolicy.SOURCE;
45

56
import java.lang.annotation.Annotation;
7+
import java.lang.annotation.Retention;
68
import java.lang.annotation.Target;
79

810
/**
@@ -40,6 +42,7 @@
4042
* }</pre>
4143
*/
4244
@Target(TYPE)
45+
@Retention(SOURCE)
4346
public @interface ConstraintAdapter {
4447

4548
/** The Annotation this validator targets */

0 commit comments

Comments
 (0)