Skip to content

v3.26.0

Latest
Compare
Choose a tag to compare
@scordio scordio released this 26 May 13:22
· 11 commits to 3.x since this release

💥 Breaking Changes

Core

  • Delegate OptionalDouble value comparison to Double.compare in hasValue assertion #3411

    Details

    This fixes the comparison of NaN values which wasn't working the way the hasValue Javadoc describes.

    The previous behavior can be obtained with getAsDouble:

    assertThat(OptionalDouble.of(Double.NaN).getAsDouble()).isSameAs(Double.NaN);

🚫 Deprecated

Core

  • Deprecate ObjectAssertFactory in favor of Assertions.assertThat(Object)
  • Deprecate AssertionErrorFactory in favor of AssertionErrorCreator
  • Deprecate catchThrowableOfType(ThrowingCallable, Class) in favor of catchThrowableOfType(Class, ThrowingCallable) #2823
  • Deprecate assertThat(Iterable, AssertFactory), assertThat(Iterable, Class) and their respective then variants #3453

✨ New Features

Core

  • Support multiple AfterAssertionErrorCollected callbacks #3313
  • Add InstanceOfAssertFactory for Set instances #3325
  • Add doesNotContainKey and doesNotContainKeys to Guava Multimap assertions #3334
  • Add assertions for JDK YearMonth type #3142
  • Add TemporalAssert type #3404
  • Add ignoringFieldsOfTypesMatchingRegexes #3369
  • Add fail(Throwable) and fail() variants #3204
  • Add isPrivate to Class assertions
  • Add doesNot[Start/End]WithWhitespace methods to CharSequence assertions #3441
  • Add createAssert(ValueProvider) to AssertFactory #3377
  • Add values() navigation method to AbstractMapAssert #3297
  • Add bytes()/bytes(Charset)/bytes(String) navigation methods to AbstractStringAssert #3232
  • Add doesNotThrowAnyExceptionExcept to AbstractThrowableAssert #3261
  • Add hasPermittedSubclasses to Class assertions #3316
  • Add isUnmodifiable to Iterator assertions #3477

🐛 Bug Fixes

Core

  • Preserve original order of elements when returning duplicates on doesNotHaveDuplicates #3333
  • Make isNotEqualTo(boolean) pass when actual is null #3343
  • Fix isEqualTo comparison of Timestamp instances with Instant #3410
  • Fix Instant conversion with Date assertions #3467
  • Rebuild default date formats used to parse strings as dates when default timezone or lenient flag changes #3382

⚡ Improvements

  • Avoid duplicating maven-javadoc-plugin configuration and CSS files #3371
  • Favor additionalOption entries in maven-javadoc-plugin

Core

  • Fix typo in Javadoc #3365
  • Improve AssertFactory Javadoc
  • Add Throwable stack trace to ShouldHaveCauseExactlyInstance #3351
  • Fix typo #3422
  • Add Throwable stack trace to ShouldHaveCauseInstance #3392
  • Implement boolean assertions directly in AbstractBooleanAssert and remove Booleans internal class
  • Remove stack trace elements triggered by AssertJ in addition to AssertJ elements #3449

🔨 Dependency Upgrades

Core

  • Upgrade to Byte Buddy 1.14.16 #3487
  • Upgrade to JUnit BOM 5.10.2 #3357

Guava

  • Upgrade to Guava 33.2.0-jre #3454

❤️ Contributors

Thanks to all the contributors who worked on this release:

@Achitheus @csct3434 @armandino @sbrannen @shaikhu @ryber @ranjitshinde91 @tmvlpl @valery1707 @izeye @yyytir777 @pbacz @biergit @Banuelorigni @java-coding-prodigy @vlsi @hazendaz @Kruschenstein @etrandafir93 @pbacz @dehasi