Hamcrest v2.1 Release Notes

Release Date: 2018-12-20 // over 5 years ago
  • Overview for 2.1

    ๐Ÿš€ After a long hiatus without releases, this version simplifies the packaging of Hamcrest into a single jar: hamcrest-<version>.jar. Other big changes include Java 9 module compatibility, migrating the code repository from Google Code to ๐Ÿ›  GitHub, along with numerous other new features, improvements and bug fixes.

    ๐Ÿ’ฅ Breaking Changes for 2.1

    • ๐Ÿ“ฆ The way that the project is packaged has changed. This may cause problems with โฌ†๏ธ correctly upgrading transitive dependencies. Refer to the Hamcrest Distributables ๐Ÿ“š documentation for more information, and in particular, โฌ†๏ธ Upgrading from Hamcrest 1.x
    • ๐Ÿšš org.hamcrest.Factory has been removed. This was only used in old implementations ๐Ÿ— of the hamcrest build toolchain, and can safely be deleted from client code without any effect.

    ๐Ÿ”„ Changes for 2.1

    • ๐Ÿ“š Documentation updates
    • Several JavaDoc improvements and corrections
    • ๐Ÿ›  Fix JavaDoc examples
    • โฌ†๏ธ Upgraded to Java 7
    • ๐Ÿ— Build with Gradle
    • Publish a single jar hamcrest-2.1.jar
    • Publish pom-only artifacts for hamcrest-core and hamcrest-library.
    • โž• Add implementation for CharSequence length matcher
    • ๐Ÿ›  Fix for TypeSafeDiagnosingMatcher can't detect generic types for subclass
    • ๐Ÿ‘‰ Make Hamcrest an OSGI bundle
    • โž• Add StringRegularExpression matcher
    • ๐Ÿ›  Fix StringContainsInOrder to detect if a repeated pattern is missing
    • โž• Add ArrayAsIterableMatcher
    • ๐Ÿ›  Fix description for IsEqualIgnoringCase
    • โœ‚ Removed deprecated methods from previous release
    • ๐Ÿ‘Œ Improve mismatch description of hasItem/hasItems
    • General improvements to mismatch descriptions
    • ๐Ÿ—„ Deprecated several matcher factory methods of the for "isXyz"
    • ๐Ÿ›  Fix GH issue #75 - address doclint errors reported in JDK 1.8
    • ๐Ÿ›  Fix GH issue #69 - Iterable contains in order is null-safe
    • ๐Ÿ›  Fix GH issue #59 - added equalToObject() (i.e. unchecked) method
    • ๐Ÿ›  Fix GH issue #25 - arrayContaining(null, null) cause NullPointerException
    • ๐Ÿ›  Fix GH issue #36 - string matching on regular expressions
    • ๐Ÿ›  Fix GH issue #8 - isCloseTo() shows wrong delta in mismatch description
    • ๐Ÿ›  Fix GH issue #59 - add untyped version of equalTo, named equalToObject
    • ๐Ÿ›  Fix GC issue #131 - Implement IsEmptyMap, IsMapWithSize
    • ๐Ÿ›  Fix GC issue #187 - IsArray.describeMismatchSafely() should use Matcher.describeMismatch
    • ๐Ÿ›  Fix GC issue #155 - Add Matcher implementation for files
    • ๐Ÿ›  Fix GC issue #69 - fix NPE in IsIterableContainingInOrder