1. 28 8月, 2019 2 次提交
  2. 23 3月, 2019 1 次提交
  3. 22 3月, 2019 1 次提交
  4. 28 6月, 2018 1 次提交
    • P
      Organize imports · 81451aa8
      Phillip Webb 提交于
      Reorganize imports to ensure consistent ordering. This commit also
      expands any `.*` static imports in favor of using fully-qualified
      method references.
      
      Issue: SPR-16968
      81451aa8
  5. 09 6月, 2017 1 次提交
    • J
      Consistent use of @Nullable in spring-test · fd53d2a5
      Juergen Hoeller 提交于
      This commit also removes nullability from two common spots: ResolvableType.getType() and TargetSource.getTarget(), both of which are never effectively null with any regular implementation. For such scenarios, a non-null empty type/target is the cleaner contract.
      
      Issue: SPR-15540
      fd53d2a5
  6. 12 7月, 2016 1 次提交
  7. 05 7月, 2016 1 次提交
  8. 28 3月, 2016 1 次提交
  9. 24 3月, 2016 1 次提交
  10. 08 12月, 2015 1 次提交
  11. 14 6月, 2015 1 次提交
    • S
      Revise method and parameter names in annotation support · 32c17bf5
      Sam Brannen 提交于
      In AnnotatedElementUtils, all methods pertaining to merging annotation
      attributes have been renamed to "getMerged*()" and "findMerged*()"
      accordingly. Existing methods such as getAnnotationAttributes(..) have
      been deprecated in favor of the more descriptive "merged" variants.
      This aligns the naming conventions in AnnotatedElementUtils with those
      already present in AnnotationReadingVisitorUtils.
      
      The use of "annotationType" as a variable name for the fully qualified
      class name of an annotation type has been replaced with
      "annotationName" in order to improve the readability and intent of the
      code base.
      
      In MetaAnnotationUtils.AnnotationDescriptor, getMergedAnnotation() has
      been renamed to synthesizeAnnotation(), and the method is now
      overridden in UntypedAnnotationDescriptor to always throw an
      UnsupportedOperationException in order to avoid potential run-time
      ClassCastExceptions.
      
      Issue: SPR-11511
      32c17bf5
  12. 29 5月, 2015 1 次提交
    • S
      Synthesize annotation from a map of attributes · e30c9b2e
      Sam Brannen 提交于
      Spring Framework 4.2 RC1 introduced support for synthesizing an
      annotation from an existing annotation in order to provide additional
      functionality above and beyond that provided by Java. Specifically,
      such synthesized annotations provide support for @AliasFor semantics.
      As luck would have it, the same principle can be used to synthesize an
      annotation from any map of attributes, and in particular, from an
      instance of AnnotationAttributes.
      
      The following highlight the major changes in this commit toward
      achieving this goal.
      
      - Introduced AnnotationAttributeExtractor abstraction and refactored
        SynthesizedAnnotationInvocationHandler to delegate to an
        AnnotationAttributeExtractor.
      
      - Extracted code from SynthesizedAnnotationInvocationHandler into new
        AbstractAliasAwareAnnotationAttributeExtractor and
        DefaultAnnotationAttributeExtractor implementation classes.
      
      - Introduced MapAnnotationAttributeExtractor for synthesizing an
        annotation that is backed by a map or AnnotationAttributes instance.
      
      - Introduced a variant of synthesizeAnnotation() in AnnotationUtils
        that accepts a map.
      
      - Introduced findAnnotation(*) methods in AnnotatedElementUtils that
        synthesize merged AnnotationAttributes back into an annotation of the
        target type.
      
      The following classes have been refactored to use the new support for
      synthesizing AnnotationAttributes back into an annotation.
      
      - ApplicationListenerMethodAdapter
      - TestAnnotationUtils
      - AbstractTestContextBootstrapper
      - ActiveProfilesUtils
      - ContextLoaderUtils
      - DefaultActiveProfilesResolver
      - DirtiesContextTestExecutionListener
      - TestPropertySourceAttributes
      - TestPropertySourceUtils
      - TransactionalTestExecutionListener
      - MetaAnnotationUtils
      - MvcUriComponentsBuilder
      - RequestMappingHandlerMapping
      
      In addition, this commit also includes changes to ensure that arrays
      returned by synthesized annotations are properly cloned first.
      
      Issue: SPR-13067
      e30c9b2e
  13. 21 10月, 2014 1 次提交
  14. 22 4月, 2014 1 次提交
  15. 10 4月, 2014 2 次提交
    • S
      5df60a2b
    • S
      Introduce context bootstrap strategy in the TCF · a281bdbf
      Sam Brannen 提交于
      Work done in conjunction with SPR-5243 and SPR-4588 introduced physical
      package cycles in the spring-test module. The work performed in
      conjunction with SPR-9924 uses reflection to resolve these physical
      package cycles; however, prior to this commit the logical package
      cycles still remain.
      
      Furthermore, over time it has become apparent that the Spring
      TestContext Framework (TCF) could better serve application developers
      and especially third-party framework developers by providing a more
      flexible mechanism for "bootstrapping" the TCF. For example, prior to
      this commit, default TestExecutionListeners could only be registered by
      subclassing TestContextManager (and SpringJUnit4ClassRunner if using
      JUnit). Similarly, the default ContextLoader could only be set by
      subclassing SpringJUnit4ClassRunner for JUnit and by copying and
      modifying AbstractTestNGSpringContextTests for TestNG.
      
      This commit addresses the aforementioned issues by introducing a
      bootstrap strategy in the TestContext framework that is responsible for
      determining default TestExecutionListeners and the default
      ContextLoader in an extensible fashion. The new TestContextBootstrapper
      SPI also provides a mechanism for supporting various types of
      MergedContextConfiguration depending on the feature set of the context
      loaders supported by the strategy.
      
      The following provides an overview of the most significant changes in
      this commit.
      
       - Introduced TestContextBootstrapper strategy SPI, BootstrapContext,
         and @BootstrapWith.
      
       - Introduced AbstractTestContextBootstrapper,
         DefaultTestContextBootstrapper, and WebTestContextBootstrapper
         implementations of the TestContextBootstrapper SPI and extracted
         related reflection code from ContextLoaderUtils & TestContextManager.
      
       - Introduced BootstrapUtils for retrieving the TestContextBootstrapper
         from @BootstrapWith, falling back to a default if @BootstrapWith is
         not present.
      
       - @WebAppConfiguration is now annotated with
         @BootstrapWith(WebTestContextBootstrapper.class).
      
       - CacheAwareContextLoaderDelegate is now an interface with a new
         DefaultCacheAwareContextLoaderDelegate implementation class.
      
       - Introduced closeContext(MergedContextConfiguration, HierarchyMode) in
         CacheAwareContextLoaderDelegate.
      
       - DefaultTestContext now uses CacheAwareContextLoaderDelegate instead
         of interacting directly with the ContextCache.
      
       - DefaultTestContext now delegates to a TestContextBootstrapper for
         building the MergedContextConfiguration.
      
       - TestContextManager now delegates to TestContextBootstrapper for
         retrieving TestExecutionListeners.
      
       - Deleted TestContextManager(Class, String) constructor and
         SpringJUnit4ClassRunner.getDefaultContextLoaderClassName(Class)
         method since default ContextLoader support is now implemented by
         TestContextBootstrappers.
      
       - Extracted ActiveProfilesUtils from ContextLoaderUtils.
      
       - Extracted ApplicationContextInitializerUtils from ContextLoaderUtils.
      
       - MetaAnnotationUtils is now a public utility class in the test.util
         package.
      
       - Removed restriction in @ActiveProfiles that a custom resolver cannot
         be used with the 'value' or 'profiles' attributes.
      
       - Introduced DefaultActiveProfilesResolver.
      
      Issue: SPR-9955
      a281bdbf