Open ascopes opened 8 months ago
These annotations (with troubles) are TYPE_USE. so correct syntax for type use annotations (when fully qualified name involved) is java.lang.@Nullable String nickName
, so private @Nullable java.lang.@Nullable String nickName;
is wrong, yes. I have to look into this seems like we have only partial support for the type use annotations.
It would appear that the current implementation is not fully compatible with custom nullable annotations such as JSpecify when specifying
@Style(fallbackNullableAnnotation = Nullable.class)
. The following code produces a malformed Java source file in the generated source outputs:The generated code around the erroneous content is as follows:
Where the erroneous line is
private @Nullable java.lang.@Nullable String nickName;
.In this case, I would expect the library to have generated this instead:
Use case
Without
fallbackNullableAnnotation = Nullable.class
, internal@Nullable
annotations are not applied as expected, even if I specify@Style(nullableAnnotation = "org.jspecify.annotations.Nullable")
directly, meaning nullness checks may fail.Versions used to reproduce the issue:
The issue appears to be that the annotation processor is trying to stack