1. 08 5月, 2019 9 次提交
    • P
      Add SimpleAnnotationMeta classes and readers · 7fbf3f97
      Phillip Webb 提交于
      Replace the existing ASM based readers with new implementations that
      also support MergedAnnotations. The meta-data classes themselves are
      now immutable, and constructed via separate reader classes.
      
      The `SimpleMetadataReader` class has been updated to return the new
      classes, however the old ones remain since some of them are public
      and might be being used directly.
      
      Closes gh-22884
      7fbf3f97
    • P
      Add MergedAnnotations support to meta-data classes · 8c2ccfe6
      Phillip Webb 提交于
      Add `AnnotatedTypeMetaData.getAnnotations()` that can be used to access
      annotation details using the `MergedAnnotations` interface.
      
      Where possible, the existing annotation methods have been migrated to
      call `getAnnotation()`, rather than needing their own implementation.
      
      The existing ASM based meta-data implementations have not been updated
      since they will be deprecated and replaced in a subsequent commit.
      
      See gh-22884
      8c2ccfe6
    • P
      Add additional class/method meta-data tests · f592c1f2
      Phillip Webb 提交于
      Add some additional tests to provide more coverage of class and method
      meta-data support.
      
      See gh-22884
      f592c1f2
    • P
      Skip java.lang.annotations when reading metadata · 1fa59378
      Phillip Webb 提交于
      Update `StandardAnnotationMetadata` and `AnnotationMetadataReadingVisitor`
      so that `java.lang.annotation` annotations are consistently skipped.
      
      Closes gh-22885
      1fa59378
    • P
      Don't expose RetentionPolicy.CLASS annotations · 8a293f51
      Phillip Webb 提交于
      Update ASM based metadata readers so that only RetentionPolicy.RUNTIME
      annotations are exposed. This aligned behavior with the reflection based
      implementation.
      
      Closes gh-22886
      8a293f51
    • P
      Add MergedAnnotations.of method · 9d6cf57c
      Phillip Webb 提交于
      Add a factory method to `MergedAnnotation` that allows an instance to
      be created for an explicit collection of root annotations. This method
      will allow ASM based readers to expose a `MergedAnnotation` instance
      that has root annotations loaded from bytecode, and meta-annotations
      loaded using reflection.
      
      See gh-22884
      9d6cf57c
    • P
      Support String->Class adaptation in MergedAnnotation · daec3531
      Phillip Webb 提交于
      Update TypeMappedAnnotation so that Strings can be used to represent
      Class attribute values. This will allow ASM annotation readers to
      present a `MergedAnnotation` instance without necessarily having the
      actual class values on the classpath.
      
      When the underlying value is a String, any calls to
      `getValue(name, String.class)` or `asMap(Adapt.CLASS_TO_STRING)` will
      simply return the original String. Calls that need the actual Class
      result (such as `getClass`) will use `Class.forName` and may throw
      a `ClassNotFoundException` at that point.
      
      This commit also allows an empty Object[] to be used to represent
      any empty primitive array.
      
      See gh-22884
      daec3531
    • P
      Rename some MergedAnnotation `from` methods to `of` · d4a761ab
      Phillip Webb 提交于
      Rename `from` to `of` for the `MergedAnnotation` factory methods that
      work with Maps. The previous name was a little confusing, especially
      when an annotation source parameter was specified. The new method name
      helps to make it clearer when the user is explicitly defining the
      attributes of the annotation, as opposed to picking them up from the
      source.
      d4a761ab
    • P
      Add MergedAnnotation.getTypeHierarchy method · 3b145a5a
      Phillip Webb 提交于
      Add a `getTypeHierarchy()` method to `MergedAnnotation` that can be used
      to return the full type hierarchy information. This method is
      specifically designed to be used in combination with
      `MergedAnnotationPredicates.unique`.
      
      This update also allows us to delete the `parentAndType` method
      from `AnnotatedElementUtils`.
      
      Closes gh-22908
      3b145a5a
  2. 07 5月, 2019 4 次提交
  3. 06 5月, 2019 1 次提交
  4. 03 5月, 2019 1 次提交
  5. 27 4月, 2019 1 次提交
  6. 26 4月, 2019 1 次提交
  7. 21 4月, 2019 1 次提交
  8. 17 4月, 2019 1 次提交
    • R
      LeakAwareDataBuffer related fixes · 375090bb
      Rossen Stoyanchev 提交于
      Following on 3ebbfa21 where the local
      refCount was removed in favor of using the internal refCount of the
      native data buffer, this commit ensures that LeakAwareDataBufferFactory
      uses a PooledDataBufferFactory delegate by default.
      
      There are also fixes for test issues with eager allocation uncovered by
      these changes in StringDecoder and ResourceDecoder.
      375090bb
  9. 11 4月, 2019 1 次提交
    • R
      Fix refCount issue in LeakAwareDataBuffer · 3ebbfa21
      Rossen Stoyanchev 提交于
      LeakAwareDataBuffer was keeping its own refCount rather than checking
      through the delegate. This leads to false leak reports in a sequence
      where an allocated buffer is retained and then sliced since it is not
      aware of the changes to the refCount through the slice.
      3ebbfa21
  10. 10 4月, 2019 1 次提交
  11. 09 4月, 2019 1 次提交
  12. 08 4月, 2019 3 次提交
  13. 06 4月, 2019 4 次提交
  14. 05 4月, 2019 1 次提交
    • S
      Add support for Coroutines Flow · a8d6ba99
      Sebastien Deleuze 提交于
      Flow is a Kotlin Coroutines related cold asynchronous
      stream of the data, that emits from zero to N (where N
      can be unbounded) values and completes normally or with
      an exception.
      
      It is conceptually the Coroutines equivalent of Flux with
      an extension oriented API design, easy custom operator
      capabilities and some suspending methods.
      
      This commit leverages Flow <-> Flux interoperability
      to support Flow on controller handler method parameters
      or return values, and also adds Flow based extensions to
      WebFlux.fn. It allows to reach a point when we can consider
      Spring Framework officially supports Coroutines even if some
      additional work remains to be done like adding
      interoperability between Reactor and Coroutines contexts.
      
      Flow is currently an experimental API that is expected to
      become final before Spring Framework 5.2 GA.
      
      Close gh-19975
      a8d6ba99
  15. 04 4月, 2019 4 次提交
  16. 03 4月, 2019 3 次提交
  17. 31 3月, 2019 1 次提交
  18. 29 3月, 2019 2 次提交
    • P
      Use RepeatableContainers.none() in AnnotationUtils · f273fa99
      Phillip Webb 提交于
      Update `AnnotationUtils` so that `RepeatableContainers.none()` is used
      when performing an exhaustive search for merged annotations. These
      parameters were accidentally removed in commit 210b1789 and weren't
      caught earlier because we were missing a test.
      
      Closes gh-22702
      f273fa99
    • P
      Ignore 'value' attribute in AnnotationTypeMapping · 800cbf25
      Phillip Webb 提交于
      Update `addConventionAnnotationValues` so that `value` attributes
      do not override existing annotation values. The aligns the new
      `MergedAnnotations` API with the previous `AnnotatedElementUtils`
      logic.
      
      Closes gh-22703
      800cbf25