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

Support Kotlin nullable information in Spring MVC parameters

    Details

    • Last commented by a User:
      true

      Description

      Spring MVC now supports defining fields with the JDK 8 Optional type to indicate that the parameter is optional (cool!).

      Kotlin has fields which can be marked as a nullable type e.g. String? vs. String. This information should be used by Spring MVC in the same way as Optional.

      See: KType documentation

        Issue Links

          Activity

          Hide
          raman Raman Gupta added a comment - - edited

          Sébastien Deleuze I've updated the pull request as requested.

          Show
          raman Raman Gupta added a comment - - edited Sébastien Deleuze I've updated the pull request as requested.
          Hide
          sdeleuze Sébastien Deleuze added a comment -

          I have polished, refactored and added more tests to your commit via this new PR, and have requested a review from Juergen since these are non-trivial additions.

          Show
          sdeleuze Sébastien Deleuze added a comment - I have polished, refactored and added more tests to your commit via this new PR , and have requested a review from Juergen since these are non-trivial additions.
          Hide
          sdeleuze Sébastien Deleuze added a comment -

          I merged a refactored version that reuses MethodParameter#isOptional(), with more tests and polish (see this additional commit)

          Show
          sdeleuze Sébastien Deleuze added a comment - I merged a refactored version that reuses MethodParameter#isOptional() , with more tests and polish (see this additional commit )
          Hide
          sdeleuze Sébastien Deleuze added a comment -

          Raman Gupta Thanks for your contribution, I will work on @Autowired and @Inject support as part of SPR-14951 (should be part of 5.0.0.M4).

          Show
          sdeleuze Sébastien Deleuze added a comment - Raman Gupta Thanks for your contribution, I will work on @Autowired and @Inject support as part of SPR-14951 (should be part of 5.0.0.M4).
          Hide
          raman Raman Gupta added a comment -

          Sébastien Deleuze Awesome, thanks!

          Show
          raman Raman Gupta added a comment - Sébastien Deleuze Awesome, thanks!

            People

            • Assignee:
              sdeleuze Sébastien Deleuze
              Reporter:
              raman Raman Gupta
              Last updater:
              Stéphane Nicoll
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                43 weeks, 1 day ago