1. 14 10月, 2015 2 次提交
  2. 13 10月, 2015 1 次提交
  3. 10 10月, 2015 2 次提交
  4. 06 10月, 2015 1 次提交
  5. 28 9月, 2015 1 次提交
    • S
      Migrate JUnit 3 tests to JUnit 4 · d5ee787e
      Sam Brannen 提交于
      This commit migrates all remaining tests from JUnit 3 to JUnit 4, with
      the exception of Spring's legacy JUnit 3.8 based testing framework that
      is still in use in the spring-orm module.
      
      Issue: SPR-13514
      d5ee787e
  6. 25 9月, 2015 1 次提交
  7. 31 8月, 2015 1 次提交
  8. 29 8月, 2015 1 次提交
    • S
      Support implicit attribute aliases with @AliasFor · d40a35ba
      Sam Brannen 提交于
      Spring Framework 4.2 introduced support for aliases between annotation
      attributes that fall into the following two categories.
      
      1) Alias pairs: two attributes in the same annotation that use
         @AliasFor to declare that they are explicit aliases for each other.
      2) Meta-annotation attribute overrides: an attribute in one annotation
         uses @AliasFor to declare that it is an explicit override of an
         attribute in a meta-annotation.
      
      However, the existing functionality fails to support the case where two
      attributes in the same annotation both use @AliasFor to declare that
      they are both explicit overrides of the same attribute in the same
      meta-annotation. In such scenarios, one would intuitively assume that
      two such attributes would be treated as "implicit" aliases for each
      other, analogous to the existing support for explicit alias pairs.
      Furthermore, an annotation may potentially declare multiple aliases
      that are effectively a set of implicit aliases for each other.
      
      This commit introduces support for implicit aliases configured via
      @AliasFor through an extensive overhaul of the support for alias
      lookups, validation, etc. Specifically, this commit includes the
      following.
      
      - Introduced isAnnotationMetaPresent() in AnnotationUtils.
      
      - Introduced private AliasDescriptor class in AnnotationUtils in order
        to encapsulate the parsing, validation, and comparison of both
        explicit and implicit aliases configured via @AliasFor.
      
      - Switched from single values for alias names to lists of alias names.
      
      - Renamed getAliasedAttributeName() to getAliasedAttributeNames() in
        AnnotationUtils.
      
      - Converted alias map to contain lists of aliases in AnnotationUtils.
      
      - Refactored the following to support multiple implicit aliases:
        getRequiredAttributeWithAlias() in AnnotationAttributes,
        AbstractAliasAwareAnnotationAttributeExtractor,
        MapAnnotationAttributeExtractor, MergedAnnotationAttributesProcessor
        in AnnotatedElementUtils, and postProcessAnnotationAttributes() in
        AnnotationUtils.
      
      - Introduced numerous tests for implicit alias support, including
        AbstractAliasAwareAnnotationAttributeExtractorTestCase,
        DefaultAnnotationAttributeExtractorTests, and
        MapAnnotationAttributeExtractorTests.
      
      - Updated Javadoc in @AliasFor regarding implicit aliases and in
        AnnotationUtils regarding "meta-present".
      
      Issue: SPR-13345
      d40a35ba
  9. 27 8月, 2015 1 次提交
  10. 22 8月, 2015 1 次提交
  11. 20 8月, 2015 1 次提交
  12. 13 8月, 2015 3 次提交
    • S
      Polish tests · f47bbb0d
      Sam Brannen 提交于
      f47bbb0d
    • G
      Properly detect available port on localhost in SocketUtils · f1514041
      Gary Russell 提交于
      SocketUtils is used to find available ports on localhost; however,
      prior to this commit, SocketUtils incorrectly reported a port as
      available on localhost if another process was already bound to
      localhost on the given port but not to other network interfaces. In
      other words, SocketUtils determined that a given port was available for
      some interface though not necessarily for the loopback interface.
      
      This commit addresses this issue by refactoring SocketUtils so that it
      tests the loopback interface to ensure that the port is actually
      available for localhost.
      
      Issue: SPR-13321
      f1514041
    • J
      Removal of redundant JdkVersion checks in the test suite · e0f012f3
      Juergen Hoeller 提交于
      Issue: SPR-13312
      e0f012f3
  13. 12 8月, 2015 3 次提交
  14. 10 8月, 2015 2 次提交
    • S
      Synthesize nested maps into annotations · f17173f6
      Sam Brannen 提交于
      Prior to this commit, attempting to synthesize an annotation from a map
      of annotation attributes that contained nested maps instead of nested
      annotations would result in an exception.
      
      This commit addresses this issue by properly synthesizing nested maps
      and nested arrays of maps into nested annotations and nested arrays of
      annotations, respectively.
      
      Issue: SPR-13338
      f17173f6
    • S
      Throw exception if required meta-annotation is not present · 82890361
      Sam Brannen 提交于
      It is a configuration error if an alias is declared via @AliasFor for
      an attribute in a meta-annotation and the meta-annotation is not
      meta-present. However, prior to this commit, the support for validating
      the configuration of @AliasFor in AnnotationUtils currently silently
      ignored such errors.
      
      This commit fixes this by throwing an AnnotationConfigurationException
      whenever a required meta-annotation is not present or meta-present on
      an annotation that declares an explicit alias for an attribute in the
      meta-annotation.
      
      Issue: SPR-13335
      82890361
  15. 09 8月, 2015 1 次提交
  16. 07 8月, 2015 2 次提交
    • S
      Polish NumberUtilsTests · e0392d9d
      Sam Brannen 提交于
      e0392d9d
    • S
      Ensure @AliasFor overrides attribute in correct meta-annotation · c8d604bf
      Sam Brannen 提交于
      Prior to this commit, an explicit override for an attribute in a
      meta-annotation configured via @AliasFor could potentially result in an
      incorrect override of an attribute of the same name but in the wrong
      meta-annotation.
      
      This commit fixes the algorithm in getAliasedAttributeName(Method,
      Class) in AnnotationUtils by ensuring that an explicit attribute
      override is only applied to the configured target meta-annotation
      (i.e., configured via the 'annotation' attribute in @AliasFor).
      
      Issue: SPR-13325
      c8d604bf
  17. 29 7月, 2015 2 次提交
    • S
      Introduce 'value' alias for 'attribute' in @AliasFor · 72529208
      Sam Brannen 提交于
      SPR-11512 introduced support for annotation attribute aliases via
      @AliasFor, requiring the explicit declaration of the 'attribute'
      attribute. However, for aliases within an annotation, this explicit
      declaration is unnecessary.
      
      This commit improves the readability of alias pairs declared within an
      annotation by introducing a 'value' attribute in @AliasFor that is an
      alias for the existing 'attribute' attribute. This allows annotations
      such as @ContextConfiguration from the spring-test module to declare
      aliases as follows.
      
      public @interface ContextConfiguration {
      
           @AliasFor("locations")
           String[] value() default {};
      
           @AliasFor("value")
           String[] locations() default {};
      
          // ...
      }
      
      Issue: SPR-13289
      72529208
    • J
      AntPathMatcher allows for case-insensitive matching · 291550a4
      Juergen Hoeller 提交于
      Issue: SPR-13286
      291550a4
  18. 28 7月, 2015 1 次提交
  19. 27 7月, 2015 1 次提交
  20. 17 7月, 2015 1 次提交
  21. 06 7月, 2015 2 次提交
  22. 27 6月, 2015 1 次提交
  23. 24 6月, 2015 1 次提交
    • S
      Uses Charset instead of String in MimeType.equals() · 89e504c2
      Sam Brannen 提交于
      Prior to this commit, Spring's MimeType checked for equality between
      two MIME types based on the equality of their properties maps; however,
      the properties maps contain string representations of the "charset"
      values. Thus, "UTF-8" is never equal to "utf-8" which breaks the
      contract for character set names which must be compared in a
      case-insensitive manner.
      
      This commit addresses this issue by ensuring that "charset" properties
      in MimeType instances are compared as Java Charset instances, thereby
      ignoring case when checking for equality between charset names.
      
      Issue: SPR-13157
      89e504c2
  24. 22 6月, 2015 1 次提交
  25. 21 6月, 2015 2 次提交
    • S
      Synthesize annotation from defaults · d0c0d9fc
      Sam Brannen 提交于
      This commit introduces a convenience method in AnnotationUtils for
      synthesizing an annotation from its default attribute values.
      
      TransactionalTestExecutionListener has been refactored to invoke this
      new convenience method.
      
      Issue: SPR-13087
      d0c0d9fc
    • S
      Resolve @Repeatable container in AnnotationUtils · a0040245
      Sam Brannen 提交于
      This commit introduces support for automatically resolving a container
      annotation configured via @Repeatable in AnnotationUtils'
      getRepeatableAnnotations() and getDeclaredRepeatableAnnotations()
      methods.
      
      Issue: SPR-13068
      a0040245
  26. 20 6月, 2015 3 次提交
    • S
      Honor contract of @Repeatable in AnnotationUtils · 594c3302
      Sam Brannen 提交于
      This commit introduces a minor bug fix for getRepeatableAnnotations()
      so that it fully complies with the contract of Java's
      getAnnotationsByType() method with regard to repeatable annotations
      declared on multiple superclasses.
      
      Issue: SPR-13068
      594c3302
    • S
      Polishing · 27d1ce84
      Sam Brannen 提交于
      27d1ce84
    • S
      Honor contract of @Repeatable in AnnotationUtils · fb83e83e
      Sam Brannen 提交于
      Prior to this commit, the implementation of getRepeatableAnnotation()
      in Spring's AnnotationUtils complied neither with the contract of
      getAnnotationsByType() nor with the contract of
      getDeclaredAnnotationsByType() as defined in AnnotatedElement in Java 8.
      
      Specifically, unexpected results can be encountered when using Spring's
      support for @Repeatable annotations: either annotations show up in the
      returned set in the wrong order, or annotations are returned in the set
      that should not even be found based on the semantics of @Repeatable.
      
      This commit remedies this problem by deprecating the existing
      getRepeatableAnnotation() methods and replacing them with new
      getRepeatableAnnotations() and getDeclaredRepeatableAnnotations()
      methods that comply with the contracts of Java's getAnnotationsByType()
      and getDeclaredAnnotationsByType(), respectively.
      
      Issue: SPR-13068
      fb83e83e
  27. 19 6月, 2015 1 次提交