Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-15942

Support null-safety at generics, varargs and array elements level

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 5.x Backlog
    • Component/s: None
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      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 SPR-15756.

        Issue Links

          Activity

          Hide
          sdeleuze Sébastien Deleuze added a comment -

          I have to postpone this improvement to a future release since there are flaws in current support that need to be fixed, see this detailed description for more info.

          Show
          sdeleuze Sébastien Deleuze added a comment - I have to postpone this improvement to a future release since there are flaws in current support that need to be fixed, see this detailed description for more info.

            People

            • Assignee:
              sdeleuze Sébastien Deleuze
              Reporter:
              sdeleuze Sébastien Deleuze
              Last updater:
              Sébastien Deleuze
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                22 weeks, 2 days ago