Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openrewrite/rewrite-testing-frameworks
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.27.0
Choose a base ref
...
head repository: openrewrite/rewrite-testing-frameworks
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.28.0
Choose a head ref
  • 11 commits
  • 34 files changed
  • 6 contributors

Commits on Feb 13, 2026

  1. Fix 6 issues in AssertJ recipe migrations (#911)

    * Fix 6 issues in AssertJ recipe migrations
    
    Fixes the following compile errors from AssertJ best practices recipe:
    
    - Issue 1: assertThat(Object) ambiguity — cast to (Object) when actual type is java.lang.Object
    - Issue 2: UseAssertSame incorrectly converts null comparisons (x != null) to assertNotSame(x, null)
    - Issue 4: isCloseTo type mismatch when actual is integral but delta is floating-point
    - Issue 5: SimplifyChainedAssertJAssertion with Map<String, ?> wildcard types
    - Issue 7: hasSize(1L) converts long literal to int parameter
    - Issue 8: JUnitAssertThrowsToAssertExceptionType imports from wrong class (AssertionsForClassTypes)
    
    All 6 fixes are covered with new tests that verify the corrections work as expected.
    
    Co-Authored-By: Claude Haiku 4.5 <[email protected]>
    
    * Revert Object cast
    
    * Remove unused method
    
    * Rename field
    
    * Minimize SimplifyChainedAssertJAssertion
    
    ---------
    
    Co-authored-by: Tim te Beek <[email protected]>
    Co-authored-by: Claude Haiku 4.5 <[email protected]>
    3 people authored Feb 13, 2026
    Configuration menu
    Copy the full SHA
    9afa99f View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2026

  1. Configuration menu
    Copy the full SHA
    58d2238 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2026

  1. Preserve throws clause when checked exceptions exist outside assertTh…

    …rows. (#899)
    
    * Preserve throws clause when checked exceptions exist outside assertThrows.
    
    * Use `reduce` & condense
    
    ---------
    
    Co-authored-by: Tim te Beek <[email protected]>
    motlin and timtebeek authored Feb 21, 2026
    Configuration menu
    Copy the full SHA
    36ebbba View commit details
    Browse the repository at this point in the history
  2. Pin AssertJ to stable 3.27.7 (#913)

    * Pin AssertJ to stable 3.27.7 to avoid corrupted SNAPSHOT TypeTable
    
    The dynamic version constraint 3.+ resolves to SNAPSHOT versions
    (3.27.7-SNAPSHOT, 3.27.8-SNAPSHOT) from Maven snapshots repository,
    causing a corrupted TypeTable cache entry. Fix AdoptAssertJDurationAssertionsTest
    failure by pinning to stable release 3.27.7.
    
    * Update classpath.tsv.gz for pinned AssertJ version
    timtebeek authored Feb 21, 2026
    Configuration menu
    Copy the full SHA
    00bc57f View commit details
    Browse the repository at this point in the history
  3. Add .contextSensitive() to Hamcrest conversion templates and improve …

    …type matching in `CollapseConsecutiveAssertThatStatements` (#912)
    
    * Add .contextSensitive() to Hamcrest conversion templates and improve type matching in CollapseConsecutiveAssertThatStatements
    
    - Add .contextSensitive() to JavaTemplate builders in HamcrestMatcherToAssertJ, HamcrestNotMatcherToAssertJ, and HamcrestIsMatcherToAssertJ to ensure templates are compiled in proper source context
    - Improve CollapseConsecutiveAssertThatStatements with fallback for partially resolved SELF return types (e.g., when assertion methods return AbstractIterableAssert instead of ListAssert)
    - Update test expectations: isNotNull() now collapses with other assertions and is removed by SimplifyRedundantAssertJChains
    - Add test case for custom types to verify hamcrest-to-AssertJ conversion works
    
    Fixes the issue where the AssertJ best practices recipe required multiple runs on Hamcrest test files before seeing chained assertions.
    
    * Fix typeToIndicator to include erased type for java types
    
    Use #{any(java.util.List)} instead of #{any()} for Java standard library
    types in HamcrestMatcherToAssertJ.typeToIndicator(). This gives the
    template parser enough type information to resolve the correct assertThat
    overload, producing proper return types even when generic type parameters
    reference custom types not on the template parser classpath.
    
    This enables CollapseConsecutiveAssertThatStatements to chain assertions
    on custom types (like List<Biscuit>) in a single pass, no longer
    requiring TypeValidation.none() in tests.
    timtebeek authored Feb 21, 2026
    Configuration menu
    Copy the full SHA
    c270c74 View commit details
    Browse the repository at this point in the history
  4. Fix 2 AssertJ migration recipe issues found via large-scale validation (

    #914)
    
    1. SimplifyRedundantAssertJChains: Don't drop isNotNull() before isNotEqualTo()/isNotSameAs()
       - These assertions pass when actual is null, so isNotNull() is not redundant
       - Found ~107 incorrect transformations in Spring Framework alone
    
    2. TruthThrowableAssertions: Handle 4 additional hasMessageThat() chains
       - Added conversions for containsMatch, doesNotContain, startsWith, endsWith
       - Prevents leaving Truth-only methods that cause compilation errors
    timtebeek authored Feb 21, 2026
    Configuration menu
    Copy the full SHA
    16f1501 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2026

  1. Add Hamcrest to AssertJ recipes for hasProperty, everyItem, and hasIt…

    …em(Matcher) (#916)
    
    * Add Hamcrest to AssertJ recipes for hasProperty, everyItem, and hasItem(Matcher)
    
    Fixes #915 by adding three new recipes to handle previously unhandled Hamcrest matchers:
    - HamcrestHasPropertyToAssertJ: converts hasProperty() to hasFieldOrProperty() or hasFieldOrPropertyWithValue()
    - HamcrestEveryItemToAssertJ: converts everyItem() to hasOnlyElementsOfType() or allSatisfy()
    - HamcrestHasItemMatcherToAssertJ: converts hasItem(Matcher) to hasAtLeastOneElementOfType() or anySatisfy()
    
    Each recipe handles optional reason arguments and includes comprehensive tests.
    
    * Update generated recipes.csv
    
    * Slight polish, adding `@Nullable` and early return
    timtebeek authored Feb 23, 2026
    Configuration menu
    Copy the full SHA
    a850e44 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4f3f340 View commit details
    Browse the repository at this point in the history
  3. Add missing Hamcrest not(Matcher) to AssertJ conversions (#866) (#917)

    Add 7 missing `HamcrestNotMatcherToAssertJ` entries for:
    - Map matchers: `not(hasKey)`, `not(hasValue)`, `not(hasEntry)`, `not(anEmptyMap)`
    - String matchers: `not(isEmptyOrNullString)`, `not(emptyOrNullString)`
    - Object matchers: `not(isA)`
    timtebeek authored Feb 23, 2026
    Configuration menu
    Copy the full SHA
    bf27539 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c75ba77 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2026

  1. Configuration menu
    Copy the full SHA
    c2860b4 View commit details
    Browse the repository at this point in the history
Loading