Open cromoteca opened 1 year ago
Given that now we use properties to parse entities, @NonNullApi
should cover all needs, as it applies to both endpoint methods and getters/setters. In case someone wants to use fields, we should support @NonNullFields
to conform to Spring.
Hilla uses @NonNullApi from Spring to make a package "not null" by default. This applies to everything in the package. But that annotation is thought to be applied only to method parameters and their return values:
@TypeQualifierDefault({METHOD,PARAMETER})
. For fields, there's the @NonNullFields annotation:@TypeQualifierDefault(FIELD)
.