Skip to content

Commit 55172fc

Browse files
committed
Use accessor annotations to determine nullness, etc.
Accessor annotations are now more complete due to adding in the `asType` annotations.
1 parent bd329fb commit 55172fc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

record-builder-processor/src/main/java/io/soabase/recordbuilder/processor/InternalRecordBuilderProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,12 @@ private void addNullCheckCodeBlock(CodeBlock.Builder builder, int index) {
567567
}
568568

569569
private boolean isNotNullAnnotated(RecordClassType component) {
570-
return component.getCanonicalConstructorAnnotations().stream().anyMatch(annotation -> notNullPattern
570+
return component.getAccessorAnnotations().stream().anyMatch(annotation -> notNullPattern
571571
.matcher(annotation.getAnnotationType().asElement().getSimpleName().toString()).matches());
572572
}
573573

574574
private boolean isNullableAnnotated(RecordClassType component) {
575-
return component.getCanonicalConstructorAnnotations().stream().anyMatch(annotation -> nullablePattern
575+
return component.getAccessorAnnotations().stream().anyMatch(annotation -> nullablePattern
576576
.matcher(annotation.getAnnotationType().asElement().getSimpleName().toString()).matches());
577577
}
578578

0 commit comments

Comments
 (0)