1. 18 6月, 2019 2 次提交
  2. 12 6月, 2019 2 次提交
  3. 23 3月, 2019 1 次提交
  4. 22 3月, 2019 1 次提交
  5. 19 7月, 2018 1 次提交
  6. 27 3月, 2018 1 次提交
  7. 07 6月, 2017 1 次提交
    • J
      Consistent use of @Nullable across the codebase (even for internals) · f813712f
      Juergen Hoeller 提交于
      Beyond just formally declaring the current behavior, this revision actually enforces non-null behavior in selected signatures now, not tolerating null values anymore when not explicitly documented. It also changes some utility methods with historic null-in/null-out tolerance towards enforced non-null return values, making them a proper citizen in non-null assignments.
      
      Some issues are left as to-do: in particular a thorough revision of spring-test, and a few tests with unclear failures (ignored as "TODO: NULLABLE") to be sorted out in a follow-up commit.
      
      Issue: SPR-15540
      f813712f
  8. 27 5月, 2017 1 次提交
    • S
      Introduce null-safety of Spring Framework API · 87598f48
      Sebastien Deleuze 提交于
      This commit introduces 2 new @Nullable and @NonNullApi
      annotations that leverage JSR 305 (dormant but available via
      Findbugs jsr305 dependency and already used by libraries
      like OkHttp) meta-annotations to specify explicitly
      null-safety of Spring Framework parameters and return values.
      
      In order to avoid adding too much annotations, the
      default is set at package level with @NonNullApi and
      @Nullable annotations are added when needed at parameter or
      return value level. These annotations are intended to be used
      on Spring Framework itself but also by other Spring projects.
      
      @Nullable annotations have been introduced based on Javadoc
      and search of patterns like "return null;". It is expected that
      nullability of Spring Framework API will be polished with
      complementary commits.
      
      In practice, this will make the whole Spring Framework API
      null-safe for Kotlin projects (when KT-10942 will be fixed)
      since Kotlin will be able to leverage these annotations to
      know if a parameter or a return value is nullable or not. But
      this is also useful for Java developers as well since IntelliJ
      IDEA, for example, also understands these annotations to
      generate warnings when unsafe nullable usages are detected.
      
      Issue: SPR-15540
      87598f48
  9. 27 9月, 2016 1 次提交
  10. 30 8月, 2016 1 次提交
  11. 05 7月, 2016 1 次提交
  12. 02 6月, 2016 1 次提交
  13. 02 12月, 2015 3 次提交
    • J
      Polishing · a9e5e9ec
      Juergen Hoeller 提交于
      a9e5e9ec
    • R
      Polish · b3f0ab52
      Rossen Stoyanchev 提交于
      b3f0ab52
    • M
      Fix media type lookup case sensitivity · b077b4dd
      mhartsock Melissa Hartsock 提交于
      Fixed a bug where the URL content negotiation "format" parameter values
      were case sensitive and only lowercase values were accepted. For
      example, URL query parameter format=json returned the appropriate JSON
      response but format=JSON resulted in a
      HttpMediaTypeNotAcceptableException and returned:
      
      406 - The resource identified by this request is only capable of
      generating responses with characteristics not acceptable according to
      the request "accept" headers.
      
      When the MappingMediaTypeFileExtensionResolver is constructed, it is
      passed a map containing the media type key to MediaType mappings
      defined in the ContentNegotiationConfigurer. In the constructor of
      MappingMediaTypeFileExtensionResolver, the keys are converted to
      lowercase and the mappings of keys to MediaTypes are added to the
      ConcurrentMap<String, MediaType> mediaTypes using the lowercase
      version of the keys. However, when retrieving the MediaType from a key
      in the lookupMediaType method, no conversion to lowercase is performed
      so any value for the URL "format" parameter other than the lowercase
      version will not return the proper MediaType result.
      
      On May 1st, 2014, a change was made to
      ParameterContentNegotiationStrategy to handle cases where the content
      negotiation format URL parameter does not result in a match for a
      MediaType. If no match is found, a HttpMediaTypeNotAcceptableException
      is thrown resulting in the 406 response above. Prior to this commit, a
      null was returned instead of throwing an exception so this issue was
      hidden and appeared to function correctly.
      
      To make the media type lookup case insensitive, added a line to the
      lookupMediaType method in MediaTypeFileExtensionResolver to first
      convert the extension (media type key) to lowercase prior to attempting
      to retrieve it from the mediaTypes map.
      
      Issue: SPR-13747
      b077b4dd
  14. 30 9月, 2015 1 次提交
  15. 02 5月, 2014 1 次提交
    • R
      Update ContentNegotiationManager for unknown path exts · 0d2aa515
      Rossen Stoyanchev 提交于
      This change refines the logic of "mapping" content negotiation
      strategies with regards to how to handle cases where no mapping is
      found.
      
      The request parameter strategy now treats request parameter values that
      do not match any mapped media type as 406 errors.
      
      The path extension strategy provides a new flag called
      "ignoreUnknownExtensions" (true by default) that when set to false also
      results in a 406. The same flag is also exposed through the
      ContentNegotiationManagerFactoryBean and the MVC Java config.
      
      Issue: SPR-10170
      0d2aa515
  16. 14 5月, 2013 1 次提交
  17. 02 1月, 2013 1 次提交
  18. 29 12月, 2012 1 次提交
  19. 13 12月, 2012 1 次提交
  20. 26 6月, 2012 2 次提交
    • R
      Enable smart suffix pattern match for request mapping · 4fd7645e
      Rossen Stoyanchev 提交于
      Following the introduction of ContentNegotiationManager that allows,
      among other things, to configure the file extensions to use for content
      negotiation, this change adds "smart" suffix pattern match that matches
      against the configured file extensions only rather than against any
      extension.
      
      Given the request mapping "/jobs/{jobName}" and one configured file
      extension ("json"), a request for "/jobs/my.job" will select the
      pattern "/jobs/{jobName}" while a request for "/jobs/my.job.json" will
      select the pattern "/jobs/{jobName}.json". Previously, both requests
      would have resulted in the pattern "/jobs/{jobName}.*".
      
      Issue: SPR-7632, SPR-8474
      4fd7645e
    • R
      Polish ContentNegotiationStrategy support · f94aed83
      Rossen Stoyanchev 提交于
      Issue: SPR-8410, SPR-8417, SPR-8418,SPR-8416, SPR-8419,SPR-7722
      f94aed83
  21. 22 6月, 2012 1 次提交
    • R
      Add abstractions for content negotiation · f05e2bc5
      Rossen Stoyanchev 提交于
      Introduced ContentNeogtiationStrategy for resolving the requested
      media types from an incoming request. The available implementations
      are based on path extension, request parameter, 'Accept' header,
      and a fixed default content type. The logic for these implementations
      is based on equivalent options, previously available only in the
      ContentNegotiatingViewResolver.
      
      Also in this commit is ContentNegotiationManager, the central class to
      use when configuring content negotiation options. It accepts one or
      more ContentNeogtiationStrategy instances and delegates to them.
      
      The ContentNeogiationManager can now be used to configure the
      following classes:
      
      - RequestMappingHandlerMappingm
      - RequestMappingHandlerAdapter
      - ExceptionHandlerExceptionResolver
      - ContentNegotiatingViewResolver
      
      Issue: SPR-8410, SPR-8417, SPR-8418,SPR-8416, SPR-8419,SPR-7722
      f05e2bc5