1. 06 5月, 2015 2 次提交
    • S
      Eliminate inspection of annotations on core Java annotations · 5d67219a
      Sam Brannen 提交于
      This commit picks up where SPR-11483 left off, with the goal of
      eliminating all unnecessary inspection of core JDK annotations in
      Spring's annotation search algorithms in AnnotatedElementUtils and
      AnnotationMetadataReadingVisitor.
      
      Issue: SPR-12989
      5d67219a
    • S
      Overhaul AnnotatedElementUtils · ba84458c
      Sam Brannen 提交于
       - Methods which search for a specific annotation now properly ensure
         that the sought annotation was actually found.
      
       - Both the "get" and the "find" search algorithms no longer needlessly
         traverse meta-annotation hierarchies twice.
      
       - Both the "get" and the "find" search algorithms now properly
         increment the metaDepth when recursively searching within the
         meta-annotation hierarchy.
      
       - Redesigned getMetaAnnotationTypes() so that it doesn't needlessly
         search irrelevant annotations.
      
       - Documented and tested hasMetaAnnotationTypes().
      
       - Documented isAnnotated().
      
      Issue: SPR-11514
      ba84458c
  2. 27 4月, 2015 1 次提交
    • S
      Document & test status quo for getMetaAnnotationTypes() · 7ef9ac7a
      Sam Brannen 提交于
      This commit documents the status quo for the getMetaAnnotationTypes()
      method in AnnotatedElementUtils and adds appropriate regression tests to
      AnnotatedElementUtilsTests.
      
      In addition, this commit also introduces a SimpleAnnotationProcessor
      base class in AnnotatedElementUtils.
      
      Issue: SPR-11514
      7ef9ac7a
  3. 25 4月, 2015 1 次提交
  4. 24 4月, 2015 1 次提交
    • S
      Support abstract, bridge, & interface methods in AnnotatedElementUtils · ad6bea1c
      Sam Brannen 提交于
      This commit introduces support for finding annotations on abstract,
      bridge, and interface methods in AnnotatedElementUtils.
      
       - Introduced dedicated findAnnotationAttributes() methods in
         AnnotatedElementUtils that provide first-class support for
         processing methods, class hierarchies, interfaces, bridge methods,
         etc.
      
       - Introduced find/get search algorithm dichotomy in
         AnnotatedElementUtils which is visible in the public API as well as
         in the internal implementation. This was necessary in order to
         maintain backwards compatibility with the existing API (even though
         it was undocumented).
      
       - Reverted all recent changes made to the "get semantics" search
         algorithm in AnnotatedElementUtils in order to ensure backwards
         compatibility, and reverted recent changes to
         JtaTransactionAnnotationParser and SpringTransactionAnnotationParser
         accordingly.
      
       - Documented internal AnnotatedElementUtils.Processor<T> interface.
      
       - Enabled failing tests and introduced
         findAnnotationAttributesFromBridgeMethod() test in
         AnnotatedElementUtilsTests.
      
       - Refactored ApplicationListenerMethodAdapter.getCondition() and
         enabled failing test in TransactionalEventListenerTests.
      
       - AnnotationUtils.isInterfaceWithAnnotatedMethods() is now package
         private.
      
      Issue: SPR-12738, SPR-11514, SPR-11598
      ad6bea1c
  5. 23 4月, 2015 2 次提交
    • S
      Support annotations on interfaces in AnnotatedElementUtils · 7f0f04df
      Sam Brannen 提交于
      This commit introduces support in AnnotatedElementUtils for finding
      annotations declared on interfaces at the type level.
      
      NB: this commit does not include support for finding annotations
      declared on interface methods.
      
      In order to maintain backward compatibility with @Transactional
      annotation attribute processing, a new getAnnotationAttributes() method
      has been added to AnnotatedElementUtils that provides a flag to control
      whether interfaces should be searched.
      SpringTransactionAnnotationParser and JtaTransactionAnnotationParser
      have been updated accordingly to ensure that interfaces are not
      unintentionally searched in the @Transactional resolution process.
      
      This commit also introduces additional tests and updates TODOs for
      SPR-12738.
      
      Issue: SPR-12944, SPR-12738
      7f0f04df
    • S
      9c6d4b78
  6. 22 4月, 2015 3 次提交
  7. 08 4月, 2015 1 次提交
  8. 30 3月, 2015 2 次提交
    • S
    • S
      Polish ConversionService tests · 72d7963b
      Sam Brannen 提交于
      - Now correctly using @test(expected=...) where appropriate.
      
      - Renamed DefaultConversionTests to DefaultConversionServiceTests.
      
      - Moved all tests related to DefaultConversionService from
        GenericConversionServiceTests to DefaultConversionServiceTests.
      
      - No longer printing to System.out.
      
      - Removed all duplicate instantiation of conversion services.
      
      - Now using Java 8 streams to simplify implementations of custom test
        converters. Also using streams in tests where appropriate.
      72d7963b
  9. 25 3月, 2015 2 次提交
  10. 19 3月, 2015 1 次提交
  11. 06 3月, 2015 3 次提交
  12. 01 3月, 2015 1 次提交
    • S
      Include charset in EncodedResource.equals() · 93c70b74
      Sam Brannen 提交于
      Prior to this commit, the implementation of equals() in EncodedResource
      was based solely on the resource and encoding. Thus, if a Charset were
      specified instead of an encoding, invocations of equals() would not
      work as expected.
      
      This commit addresses this issue by including the charset in the
      implementation of equals() and introducing corresponding tests in a new
      EncodedResourceTests class. Furthermore, this commit makes
      EncodedResource immutable and updates all Javadoc to reflect support
      for the encoding and charset properties.
      
      Issue: SPR-12767
      93c70b74
  13. 28 2月, 2015 3 次提交
  14. 24 2月, 2015 2 次提交
    • S
      polishing · 4ca32d1c
      Stephane Nicoll 提交于
      4ca32d1c
    • S
      Add converter support for Stream · 018adb04
      Stephane Nicoll 提交于
      Add StreamConverter to provide full support for converting
      java.util.stream.Stream instances to and from collections or arrays.
      
      Also attempt to convert the element type if necessary.
      
      StreamConverter is registered by default in the DefaultConversionService
      as long as Java8 is available.
      
      Issue: SPR-12175
      018adb04
  15. 21 2月, 2015 2 次提交
  16. 19 2月, 2015 1 次提交
    • S
      Detect Order on target class as well · 1aec6a6c
      Stephane Nicoll 提交于
      Previously, the `@order` annotation was managed in an inconsistent way
      when placed at the implementation level. For simple beans, it was
      discovered properly but wasn't for beans requiring a proxy.
      
      OrderComparator.SourceProvider now explicitly allows to return several
      order sources; the default implementation returns not only the factory
      method (if  any) but also the target class if it happens to be different
      from the class of the bean.
      
      Issue: SPR-12636
      1aec6a6c
  17. 25 1月, 2015 1 次提交
  18. 11 12月, 2014 3 次提交
    • S
      Demonstrate that the CollectionFactory API is not type-safe · c62fbea2
      Sam Brannen 提交于
      This commit introduces test methods in CollectionFactoryTests that
      demonstrate how the APIs for createCollection() and createMap() are not
      type-safe, specifically regarding the use of generics, raw types, and
      casting.
      c62fbea2
    • S
      Create empty EnumSets & EnumMaps in CollectionFactory · aec284a4
      Sam Brannen 提交于
      SPR-12483 introduced automatic type conversion support for EnumSet and
      EnumMap. However, the corresponding changes in CollectionFactory
      contradict the existing contract for the "create approximate" methods
      by creating a copy of the supplied set or map, thereby potentially
      including elements in the returned collection when the returned
      collection should in fact be empty.
      
      This commit addresses this issue by ensuring that the collections
      returned by createApproximateCollection() and createApproximateMap()
      are always empty.
      
      Furthermore, this commit improves the Javadoc throughout the
      CollectionFactory class.
      
      Issue: SPR-12533
      aec284a4
    • S
      Demonstrate that the CollectionFactory API is not type-safe · fb426fe6
      Sam Brannen 提交于
      This commit introduces test methods in CollectionFactoryTests that
      demonstrate how the APIs for createApproximateCollection() and
      createApproximateMap() are not type-safe, specifically regarding the use
      of generics, raw types, and casting.
      fb426fe6
  19. 10 12月, 2014 2 次提交
  20. 29 11月, 2014 1 次提交
  21. 26 11月, 2014 1 次提交
  22. 22 11月, 2014 1 次提交
  23. 20 11月, 2014 1 次提交
    • C
      Allow non-String args in JOptCommandLinePropertySource · dff48ad8
      Chris Beams 提交于
      Prior to this commit, JOptCommandLinePropertySource prevented the
      possibility of non-String option arguments. This effectively prevents
      the use of JOpt's #ofType support (which allows specifying custom
      argument types).
      
      Now, non-String arguments are detected and converted to strings as
      necessary. JOpt's #ofType now works as expected. A test has been added
      to cover this case.
      dff48ad8
  24. 21 10月, 2014 2 次提交