1. 12 9月, 2014 1 次提交
  2. 06 8月, 2014 1 次提交
    • D
      Change GenericConversionService to better handle enum · d0e6f0f7
      David Haraburda 提交于
      Prior to this commit, given an enum which implements some interface,
      GenericConversionService would select the String -> Enum converter even
      if a converter for String -> SomeInterface was registered.  This also
      affected converters that were registered for String ->
      SomeBaseInterface, when SomeInterface extended SomeBaseInterface.
      
      This change modifies the behavior of the private method
      getClassHierarchy() by placing Enum.class as late as possible, pretty
      much the same way as Object.class is handled.
      
      Issue: SPR-12050
      d0e6f0f7
  3. 17 6月, 2014 1 次提交
  4. 26 3月, 2014 1 次提交
  5. 10 3月, 2014 1 次提交
  6. 02 2月, 2014 1 次提交
  7. 01 2月, 2014 1 次提交
  8. 31 12月, 2013 1 次提交
  9. 18 12月, 2013 1 次提交
  10. 18 10月, 2013 1 次提交
  11. 30 8月, 2013 2 次提交
  12. 02 7月, 2013 1 次提交
    • P
      Add ConversionService support for ByteBuffers · 9dba73df
      Phillip Webb 提交于
      Add ByteBufferConverter that is registered by default with the
      DefaultConversionService. Allows conversion from/to a ByteBuffer and
      byte[] or to any type that can be converted via a byte[].
      
      Issue: SPR-10712
      9dba73df
  13. 14 5月, 2013 1 次提交
  14. 26 2月, 2013 1 次提交
    • P
      StringToEnumConverterFactory class from enum value · 9a6c6b9e
      Phillip Webb 提交于
      Update StringToEnumConverterFactory to search superclasses until
      Class.isEnum() returns true. This allows conversion when the
      enum class is obtained from the enum value:
      
          public static enum SubFoo {
              BAR { String s() { return "x"; } };
              abstract String s();
          }
      
          conversionService.convert("BAR", SubFoo.BAR.getClass())
      
      This fix is particularly important when converting collections of
      enums.
      
      Issue: SPR-10329
      9a6c6b9e
  15. 30 1月, 2013 1 次提交
  16. 23 1月, 2013 1 次提交
  17. 02 1月, 2013 2 次提交
    • P
      Move spring-build-junit into spring-core · 65fb26f8
      Phillip Webb 提交于
      Move code from spring-build-junit into spring-core/src/test along with
      several other test utility classes. This commit removes the temporary
      spring-build-junit project introduced in commit
      b083bbde.
      65fb26f8
    • P
      Fix [deprecation] compiler warnings · 6626a387
      Phillip Webb 提交于
      Fix deprecation compiler warnings by refactoring code or applying
      @SuppressWarnings("deprecation") annotations. JUnit tests of
      internally deprecated classes are now themselves marked as
      @Deprecated.
      
      Numerous EasyMock deprecation warnings will remain until the
      migration to mockito can be completed.
      6626a387
  18. 29 12月, 2012 5 次提交
    • C
      Update Apache license headers for affected sources · 8472a2b2
      Chris Beams 提交于
      8472a2b2
    • P
      Ignore performance-sensitive tests by default · 60032e00
      Phillip Webb 提交于
      Make use of the new JUnit functionality introduced in the previous
      commit to 'Assume' that perfomance- and timing-sensitive tests should
      run only when TestGroup.PERFORMANCE is selected, i.e. when
      -PtestGroups="performance" has been provided at the Gradle command line.
      
      The net effect is that these tests are now ignored by default, which
      will result in far fewer false-negative CI build failures due to
      resource contention and other external factors that cause slowdowns.
      
      We will set up a dedicated performance CI build to run these tests on
      an isolated machine, etc.
      
      Issue: SPR-9984
      60032e00
    • C
      Add @Override annotations to test sources · 4c8cd7b0
      Chris Beams 提交于
      Issue: SPR-10129
      4c8cd7b0
    • P
      Fix [cast] compiler warnings · 6c14eaad
      Phillip Webb 提交于
      6c14eaad
    • P
      Fix [serial] compiler warnings · b0986049
      Phillip Webb 提交于
      Fix serialization warnings by applying @SuppressWarnings("serial")
      when appropriate.
      
      In certain cases and for unknown reasons, a correctly-placed
      @SuppressWarnings("serial") annotation will fix the warning at the
      javac level (i.e. the Gradle command-line), but will produce an
      "unnecessary @SuppressWarnings" warning within Eclipse. In these
      cases, a private static final serialVersionUID field has been added
      with the default value of 1L.
      b0986049
  19. 23 12月, 2012 2 次提交
    • P
      Fix GenericConversionService search algorithm · 1abb7f66
      Phillip Webb 提交于
      Previously the algorithm used by GenericConversionService to find
      converters incorrectly searched for interfaces working up from the
      base class. This caused particular problems with custom List
      converters as as the Collection interface would be considered before
      the List interface giving CollectionToObjectConverter precedence
      over the custom converter.
      
      The updated algorithm restores the class search order to behave in the
      same way as Spring 3.1.
      
      Issue: SPR-10116
      Backport-Issue: SPR-10117
      Backport-Commit: aa914497
      1abb7f66
    • P
      Fix GenericConversionService search algorithm · aa914497
      Phillip Webb 提交于
      Previously the algorithm used by GenericConversionService to find
      converters incorrectly searched for interfaces working up from the
      base class. This caused particular problems with custom List
      converters as as the Collection interface would be considered before
      the List interface giving CollectionToObjectConverter precedence
      over the custom converter.
      
      The updated algorithm restores the class search order to behave in the
      same way as Spring 3.1.
      
      Issue: SPR-10116
      aa914497
  20. 31 10月, 2012 1 次提交
    • P
      Avoid NPE in ObjectToObjectConverter · 31331e6a
      Phillip Webb 提交于
      Bypass ObjectToObject conversion when source and object types are
      identical and protect against a null source object.
      
      Prior to this commit the TypeDescriptor was used to determine if
      conversion was necessary.  This caused issues when comparing a
      descriptor with annotations to one without.  The updated code
      now compares using TypeDescriptor.getType().
      
      The ObjectToObject converter will now no longer attempt to convert
      null source objects.
      
      Issue: SPR-9933
      31331e6a
  21. 30 10月, 2012 5 次提交
    • C
      Review and polish pull request #132 · 222eec58
      Chris Beams 提交于
      Content:
      
       - Rename Conditional{Conversion=>Converter}
       - Add @since tags where appropriate
       - Update Apache date headers to read 2002-2012 (not just 2012)
       - Correct minor Javadoc typo
      
      Style:
      
       - Polish line breaks / whitespace
       - Use wildcard static imports where appropriate
      
      Issue: SPR-9566, SPR-9692, SPR-9928, SPR-9927
      222eec58
    • P
      Support conversion from Enum Interface · f82c6ed7
      Phillip Webb 提交于
      EnumToStringConverter in now conditional and only matches Enums that
      do not implement interfaces that can be converted.
      
      Issue: SPR-9692
      f82c6ed7
    • P
      Bypass conversion when possible · a27d1a28
      Phillip Webb 提交于
      Prior to this commit conversion between like types would often result in
      a copy of the object. This can be problematic in the case of large byte
      arrays and objects that do not have a default constructor.
      
      The ConversionService SPI now includes canBypassConvert methods that can
      be used to deduce when conversion is not needed. Several existing
      converters have been updated to ensure they only apply when source and
      target types differ.
      
      This change introduces new methods to the ConversionService that will
      break existing implementations. However, it anticipated that most users
      are consuming the ConversionService interface rather then extending it.
      
      Issue: SPR-9566
      a27d1a28
    • P
      Extend conditional conversion support · f13e3ad7
      Phillip Webb 提交于
      Introduce new ConditionalConversion interface that can be applied to
      Converter, ConverterFactory or GenericConverter interfaces to make
      them conditional. Prior to this commit the only
      ConditionalGenericConverter could be conditional.
      
      Issue: SPR-9928
      f13e3ad7
    • P
      Additional GenericConversionService Tests · 9bfe6757
      Phillip Webb 提交于
      9bfe6757
  22. 27 10月, 2012 1 次提交
  23. 13 10月, 2012 4 次提交
  24. 31 1月, 2012 1 次提交
    • C
      Rename modules {org.springframework.*=>spring-*} · 02a4473c
      Chris Beams 提交于
      This renaming more intuitively expresses the relationship between
      subprojects and the JAR artifacts they produce.
      
      Tracking history across these renames is possible, but it requires
      use of the --follow flag to `git log`, for example
      
          $ git log spring-aop/src/main/java/org/springframework/aop/Advisor.java
      
      will show history up until the renaming event, where
      
          $ git log --follow spring-aop/src/main/java/org/springframework/aop/Advisor.java
      
      will show history for all changes to the file, before and after the
      renaming.
      
      See http://chrisbeams.com/git-diff-across-renamed-directories
      02a4473c