Releases: SQiShER/java-object-diff
v0.95-RC5
Switch from Maven to Gradle
v0.94
- Comparison: Values of different types will now be compared via
equals
method instead of causing an exception. #162 - DiffNode: DiffNodes now return all configured categories instead of just the ones fron the annotation. #160
- Introspection: The
StandardIntrospector
will now only be created when needed, so platforms like Android (wherejava.beans.Introspector
is not available) can easily provide alternative implementations. #158 - Maintenance: Fully replaced TestNG, Mockito and FestAssert with Spock.
- Maintenance: Added Eclipse files to .gitignore #153
- Maintenance: Fixed typo in JavaDoc of CircularReferenceConfigurer #154
Big thanks to @jlsalmon, @scompo, @simplysoft & @PascalSchumacher for your contributions!
v0.93.2
- Fixes a memory leak when the
ObjectDiffer
throws an exception
v0.93.1
v0.93
-
Comparison: The
ObjectDifferBuilder
now provides new configuration outlet calledidentity
This allows for providing a custom strategy to establish the identity of collection items base
on something other than the equals method. That's especially useful when you have no control
over the items equals and hashCode methods.However, it's a brand-new feature and there may be some corner-cases that have not yet been
anticipated. If you run into any trouble using this feature, please feel free to open a ticket
in the issue tracker.Many thanks to @NagyGa1 for his help on this feature.
v0.92.1
v0.92
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 oncompareTo
will be invoked on theworking
and thebase
object and both will be considered equal if either one of this comparisons returnstrue
. -
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.
v0.91
Features
- Inclusion: Implemented a mechanism to control the inclusion of properties of specific object types.
- Inclusion: Implemented a mechanism to register custom inclusion resolvers to support inclusion rules far beyond the built-in ones.
- Introspection: Implemented a mechanism to register a custom instance factory, which is used by
DiffNode#canonicalSet
in order to create instances of missing objects
Improvements
- Inclusion: Performance improvements (Thanks @Deipher)
- Inclusion:
InclusionService
has been split into severalInclusionResolver
s - DiffNode:
canonicalSet
now automatically creates missing objects along the path to the root object
Bugfixes
- Circular Reference Detection: Fixed 'Detected inconsistency in enter/leave sequence. Must always be LIFO.' bug that could occur due to inconsistent cleanup of the instance memory when a circular reference has been detected.
v0.90
This version breaks API-compatibility with the previous versions, but comes with a much more powerful and intuitive configuration API and builds a strong foundation for the future of this library.
What's new?
- Fluent and more consistent configuration API
- Designed for extensibility
- Added more ways to configure the ObjectDiffer without changing the underlying objects
- Custom Differs to make it easier to add missing features like array diffing
- Custom ComparisonStrategies to configure different ways how objects are compared
- Custom Introspectors to allow advanced introspection (e.g. extracting annotations of interfaces)
- Modular configuration to make it easier to add new features
- Configuration possible on types, categories and property paths
- Less insane package structure (only a small amount of unavoidable, fluent API-related tangles left)
- Added lots of acceptance tests written in Spock to serve as living examples
- Migrated lots of tests from TestNG to Spock (still many more to go...)
- I tried to add more JavaDoc comments to public methods, but there are still many, many more that would benefit from good comments. However, I hope the fluent API is self-explanatory enough, so the lack of documentation isn't all that bad
v0.90.RC1
This version breaks API-compatibility with the previous versions, but comes with a much more powerful and intuitive configuration API and builds a strong foundation for the future of this library.
Until the release of the final version, I cannot guarantee, that the API won't change in some places, so please only upgrade, when you're willing to deal with that. Otherwise please stick with version 0.13.1 until then.
What's new?
- Fluent and more consistent configuration API
- Designed for extensibility
- Added more ways to configure the ObjectDiffer without changing the underlying objects
- Custom Differs to make it easier to add missing features like array diffing
- Custom ComparisonStrategies to configure different ways how objects are compared
- Custom Introspectors to allow advanced introspection (e.g. extracting annotations of interfaces)
- Modular configuration to make it easier to add new features
- Configuration possible on types, categories and property paths
- Less insane package structure (only a small amount of unavoidable, fluent API-related tangles left)
- Added lots of acceptance tests written in Spock to serve as living examples
- Migrated lots of tests from TestNG to Spock (still many more to go...)
- I tried to add more JavaDoc comments to public methods, but there are still many, many more that would benefit from good comments. However, I hope the fluent API is self-explanatory enough, so the lack of documentation isn't all that bad