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.34.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.35.0
Choose a head ref
  • 10 commits
  • 25 files changed
  • 6 contributors

Commits on Apr 8, 2026

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

Commits on Apr 10, 2026

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

Commits on Apr 11, 2026

  1. Add MigrateToKafkaNative recipe for Testcontainers (#568) (#967)

    * Add MigrateToKafkaNative recipe for Testcontainers (#568)
    
    * Address review feedback on ReplaceContainerImageName
    
    - Use @requiredargsconstructor with @Getter final fields for displayName/description
    - Make MethodMatcher a static field
    - Use UsesMethod precondition instead of UsesType
    - Also handle new DockerImageName(String) constructor calls
    
    * Regenerate recipes.csv for new recipes
    
    * Use @value instead of @requiredargsconstructor in ReplaceContainerImageName
    
    * Replace gvenzl/oracle-xe image in MigrateToOracleFree recipe
    
    * Update apache/kafka-native image to 4.0.2
    
    * Add image replacements for ClickHouse, Toxiproxy, and Vault
    
    Replace deprecated Docker image names with their current equivalents:
    - yandex/clickhouse-server -> clickhouse/clickhouse-server
    - shopify/toxiproxy -> ghcr.io/shopify/toxiproxy
    - vault -> hashicorp/vault
    
    When newImage has no tag, the original tag is preserved.
    timtebeek authored Apr 11, 2026
    Configuration menu
    Copy the full SHA
    58bcc12 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2026

  1. Fix ClassCastException in RemoveTimesZeroAndOne (#969)

    * Fix ClassCastException in RemoveTimesZeroAndOne when verify arg is not a method invocation (#968)
    
    * Add @issue annotation to retainVerificationModeIdentifier test
    timtebeek authored Apr 13, 2026
    Configuration menu
    Copy the full SHA
    ea72478 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2026

  1. Fix RemoveTryCatchFailBlocks failing when removing blocks within lamb…

    …da expressions (#970)
    
    * Fix RemoveTryCatchFailBlocks failing when removing blocks within lambda expressions
    
    * Maybe this will fix test failure seen on CI
    
    * Disable the test because I don't care enough to investigate why it's failing on CI but not locally
    sambsnyd authored Apr 15, 2026
    Configuration menu
    Copy the full SHA
    675b57d View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2026

  1. Use KotlinTypeUtils.isKotlinUnit to match Kotlin void return types (#971

    )
    
    Follow-up to #970, which disabled `doNotChangeAlreadyUnitTestMethods` with
    comment "flaky on CI but I don't know why".
    
    Root cause: as of rewrite 8.79.4 (openrewrite/rewrite#7364), the Kotlin
    parser maps non-nullable `kotlin.Unit` to JVM `JavaType.Primitive.Void`.
    `TypeUtils.isOfClassType(type, "kotlin.Unit")` returns false for a
    primitive, so the recipe no longer skips already-Unit methods and rewrites
    them unnecessarily — tripping the single-cycle stability check on CI.
    Locally, stale `rewrite-kotlin` snapshots still carry the pre-change
    behaviour, which is why the failure was CI-only.
    
    Use `KotlinTypeUtils.isKotlinUnit` (introduced in the same PR #7364)
    which accepts either `JavaType.Primitive.Void` or a `kotlin.Unit` class
    reference, and re-enable the disabled test.
    timtebeek authored Apr 16, 2026
    Configuration menu
    Copy the full SHA
    83d1f44 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2026

  1. Configuration menu
    Copy the full SHA
    13f0a17 View commit details
    Browse the repository at this point in the history
  2. Fix MockWebServer Dispatcher return type and RecordedRequest renames (#…

    …972)
    
    * Fix MockWebServer Dispatcher return type and RecordedRequest renames
    
    Restore the `MockResponse` return type on `Dispatcher.dispatch()`
    overrides after the blanket `MockResponse` → `MockResponse.Builder`
    rename, wrapping return expressions with `.build()`. Also rename
    `RecordedRequest.getPath()` → `getTarget()` and `getRequestUrl()` →
    `getUrl()` to match mockwebserver3 5.x.
    
    * Prevent Dispatcher.dispatch() misconversion instead of correcting after
    
    Retarget UpdateMockWebServerDispatcher to match OLD (okhttp3.mockwebserver.*)
    types and run it before the blanket ChangeType, so dispatch() is pinned to
    mockwebserver3.MockResponse up front rather than reverted post-hoc.
    
    * Use JavaTemplate to replace dispatch() return type
    
    Drop the manual J.Identifier construction in favor of a JavaTemplate
    replace, which delegates type attribution to the parser and removes the
    Tree/Collections imports.
    
    * Regenerate recipes.csv for UpdateMockWebServerDispatcher
    
    * Use MethodMatcher for dispatch() override detection
    timtebeek authored Apr 17, 2026
    Configuration menu
    Copy the full SHA
    f041383 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2026

  1. Add @MockitoSettings(strictness = Strictness.WARN) for Mockito migrat…

    …ion (#966)
    
    * Add @MockitoSettings(strictness = Strictness.WARN) support for Mockito migration
    
    Addresses the UnnecessaryStubbingException issue that occurs after migrating
    from Mockito 1.x, where unused stubbings were silently ignored but now fail
    under MockitoExtension's default STRICT_STUBS strictness.
    
    Two changes:
    
    1. MockitoJUnitToMockitoExtension now adds @MockitoSettings even when
       @ExtendWith(MockitoExtension.class) is already present, preserving the
       original WARN strictness from the MockitoRule being removed.
    
    2. New AddMockitoSettingsWithWarnStrictness recipe targets classes that
       already have @ExtendWith(MockitoExtension.class) but no MockitoRule
       to convert and no @MockitoSettings — the gap not covered by the
       existing recipe.
    
    * Fix oscillation: keep AddMockitoSettingsWithWarnStrictness standalone
    
    MockitoBestPractices includes RemoveAnnotation for @MockitoSettings(WARN),
    which conflicts with our recipe when both run in the same composite chain
    (e.g., JMockitToMockito → MockitoBestPractices → Mockito1to5Migration).
    Restore UsesType precondition and remove from Mockito1to3Migration chain.
    
    * Guard AddMockitoSettingsWithWarnStrictness with pre-3.0 Mockito precondition
    
    Introduces a declarative YAML wrapper
    `AddMockitoSettingsWithWarnStrictnessForLegacyMockito` that applies the
    underlying recipe only when the module depends on Mockito < 3.0. This
    avoids adding `@MockitoSettings(strictness = Strictness.WARN)` for
    projects that never used pre-3 Mockito defaults, while still preserving
    lenient behavior for Mockito 1.x/2.x migrations.
    
    * Refactor MockitoJUnitToMockitoExtension annotation handling
    
    Consolidate RunWith, ExtendWith, and MockitoSettings logic behind a
    single FindAnnotations check, move maybeAddImport calls next to their
    templates, and use a static import for Comparator.comparing.
    
    * Use direct return
    
    ---------
    
    Co-authored-by: Tim te Beek <[email protected]>
    bmuschko and timtebeek authored Apr 18, 2026
    Configuration menu
    Copy the full SHA
    e09430b View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2026

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