Skip to content

Support null-safety at generics, varargs and array elements level [SPR-15942] #20496

Closed as not planned
@spring-projects-issues

Description

@spring-projects-issues

Sébastien Deleuze opened SPR-15942 and commented

As raised and discuss on KT-19592 Kotlin issue, null-safety of Spring API does not apply to generic type arguments. To do so, after KT-19592 being fixed we would have to use ElementType.TYPE_USE but its scope is too wide to make it usable for us at @TypeQualifierDefault level of @Nullable and @NonNullApi.

Another solution would be to add ElementType.TYPE_USE at @Target and annotate every generic type argument of Spring API, maybe that could be done via introducing a @NonNull annotation that would also be useful for #20311.


Issue Links:

Referenced from: commits 0e1be82, 1bc93e3

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions