Skip to content

v0.92

Compare
Choose a tag to compare
@SQiShER SQiShER released this 02 May 16:53
· 90 commits to master since this release

Improvements

  • Comparison: Enable ComparableComparisonStrategy for more types

    Up until now this strategy only applied to BigDecimals. It has now been extended to automatically apply to all simple types that implement java.lang.Comparable.

    The list of types that qualify as simple has also been extended. It now looks as follows:

    • all primitive types (int, short, byte, etc.)
    • all primitive wrapper types (Integer, Short, Byte, etc.)
    • enums
    • subclasses of:
      • java.math.BigDecimal
      • java.math.BigInteger
      • java.lang.CharSequence
      • java.util.Calendar
      • java.util.Date
    • java.lang.Class
    • java.net.URI
    • java.net.URL
    • java.util.Locale
    • java.util.UUID

    Of course this behaviour can be overriden via configuration API or property annotations.

    To make comparison via compareTo more reliable, from now on compareTo will be invoked on the working and the base object and both will be considered equal if either one of this comparisons returns true.

  • Comparison: Dates are now compared via compareTo method to workaround the strictness of java.util.Date's equals method, which only returns true for other java.util.Dates, but not for extending classes like java.sql.Date. [#85]

  • DiffNode: Replaced some constructors with factory methods to better express their intentions.

  • Utilities: Removed some unused collection utility methods.

  • Tests: Migrated many, many more tests from TestNG to Spock.

  • Tests: Upgraded to Groovy 2.3 and Spock 1.0.