Releases: SQiShER/java-object-diff
v0.13.1
These release notes are work in progress...
You can find a list of fixed issues here.
Thanks a lot to Maros-1984 for his contributions!
v0.13
Features
- Objects can now provide alternative versions of themselves for equalsOnly comparison by simply providing the name of a
equalsOnlyValueProvider
method. The values returned by this method will then be compared viaequals
method. Thanks to j1ee for adding this feature. For some more detailed examples, take a look at this Spock specification. [#69] - Equality of objects implementing
Comparable
can now also be checked viacompareTo
method, by configuring them ascompareToOnlyType
. Thanks to Jean-Eudes and jlrigau for adding this feature. For some more detailed examples, take a look at this Spock specification [#67]
Bugfixes
- Explicitly including a property now implicitly includes its children as well. [#70]
BigDecimal
is now compared viacompareTo
instead ofequals
. [#67]
Improvements
- Added TravisCI support. Because it's awesome!
v0.12
Features
-
[#66] The signature of compared objects is now determined at runtime whenever possible. The signature of bean property values used to simply be the one of its getters return type. The object differ now does its best to determine the most specific shared object type. It does this like so:
- If the object types of base and working are the same, the signature of this type will be used for introspection. (1)
- If the object types of base and working are different, the signature of their closest shared superclass will be used. (2)
- If no shared superclass could be found, it falls back the the declared return type of the objects property getter. (3)
The runtime type analysis will not consider shared interfaces, so the only way to diff exclusively against interface signatures, is to cause the type lookup to fall through to (3). Currently I'm not sure if it needs to be possible to force the object differ to always use the declared type. If you think it does or this new behavior causes you any trouble, please let me know.