File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
validator-generator/src/main/java/io/avaje/validation/generator Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 17
17
final class Util {
18
18
19
19
private static final String NULLABLE = "Nullable" ;
20
- static final Set <String > BASIC_TYPES = Set .of ("java.lang.String" , "java.math.BigDecimal" );
20
+ private static final Set <String > BASIC_TYPES = Set .of ("java.lang.String" , "java.math.BigDecimal" );
21
21
22
22
private Util () {}
23
23
@@ -28,16 +28,14 @@ static boolean isValid(Element e) {
28
28
}
29
29
30
30
/** Return true if the element has a Nullable annotation. */
31
- public static boolean isNullable (Element p ) {
32
-
31
+ static boolean isNullable (Element p ) {
33
32
if (ProcessorUtils .hasAnnotationWithName (p , NULLABLE )) {
34
33
return true ;
35
34
}
36
-
37
35
var type =
38
- p instanceof ExecutableElement ex
39
- ? UType .parse (ex .getReturnType ())
40
- : UType .parse (p .asType ());
36
+ p instanceof ExecutableElement ex
37
+ ? UType .parse (ex .getReturnType ())
38
+ : UType .parse (p .asType ());
41
39
42
40
for (final AnnotationMirror mirror : type .annotations ()) {
43
41
if (NULLABLE .equalsIgnoreCase (shortName (mirror .getAnnotationType ().toString ()))) {
@@ -158,7 +156,6 @@ static boolean isPublic(Element element) {
158
156
if (mods .contains (Modifier .PRIVATE ) || mods .contains (Modifier .PROTECTED )) {
159
157
return false ;
160
158
}
161
- var isImported = ProcessingContext .isImported (element );
162
- return !isImported ;
159
+ return !ProcessingContext .isImported (element );
163
160
}
164
161
}
You can’t perform that action at this time.
0 commit comments