File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
validator-generator/src/main/java/io/avaje/validation/generator Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ public boolean isClassLvl() {
199
199
return classLevel ;
200
200
}
201
201
202
- public boolean hasAnnotations () {
202
+ public boolean hasConstraints () {
203
203
return !elementAnnotations .isEmpty ();
204
204
}
205
205
}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ void read(TypeElement type) {
59
59
}
60
60
61
61
final var classAdapter = new FieldReader (type , genericTypeParams , true );
62
- if (classAdapter .hasAnnotations ()) {
62
+ if (classAdapter .hasConstraints ()) {
63
63
localFields .add (classAdapter );
64
64
}
65
65
@@ -72,7 +72,10 @@ void read(TypeElement type) {
72
72
private void readField (Element element , List <FieldReader > localFields ) {
73
73
if (includeField (element )) {
74
74
seenFields .add (element .toString ());
75
- localFields .add (new FieldReader (element , genericTypeParams ));
75
+ var reader = new FieldReader (element , genericTypeParams );
76
+ if (reader .hasConstraints ()) {
77
+ localFields .add (new FieldReader (element , genericTypeParams ));
78
+ }
76
79
}
77
80
}
78
81
You can’t perform that action at this time.
0 commit comments