Proposed code changes to us template#853
Merged
steve-aom-elliott merged 1 commit into1589-correcting-mockwebserver-migrationfrom Nov 27, 2025
Merged
Conversation
…possible for future error occurrences.
steve-aom-elliott
pushed a commit
that referenced
this pull request
Dec 11, 2025
…possible for future error occurrences. (#853)
steve-aom-elliott
pushed a commit
that referenced
this pull request
Dec 12, 2025
…possible for future error occurrences. (#853)
steve-aom-elliott
pushed a commit
that referenced
this pull request
Jan 7, 2026
…possible for future error occurrences. (#853)
dsgrieve
pushed a commit
that referenced
this pull request
Jan 15, 2026
…possible for future error occurrences. (#853)
timtebeek
added a commit
that referenced
this pull request
Jan 22, 2026
* WiP * WiP 2 - am able to get `.build()` added, but seems to drop the after padding (including the newline), leading to it changing wrapping. * Expanding tests and conversions to include headers methods * Adapted the failing recipe to add as much debug/retry information as possible for future error occurrences. (#853) * Reapplying paddings from arguments as they were prior to chaining `.build()`, and backpatching the parameter types onto the various method invocations. Feels like there could be a lot of improvement still with how this done, as it feels pretty hacky right now. * wip * WiP - Ripped out a lot * wip classpath jars * iterate over a list of old to new replacement methods * use template for adding .build() on MockResponseBuilder * try to handle chained call * inline static patchReturnTypeAndName method call * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/test/java/org/openrewrite/java/testing/junit5/UpgradeOkHttpMockWebServerTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/main/java/org/openrewrite/java/testing/junit5/UpdateMockWebServerMockResponse.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * patch .build() return type and name * replace edits lost in merge * update recipes.csv * add test for method name changes and test with MockResponse return type * fix unit tests * clean up * convert MockResponse "with" methods * fix line wrap * Use separate test classes for the two cases * Remove unused field * remove duplicate code in patchReturnTypeAndName * Inline the delegating `patchReturnTypeAndName` * Replace the ChangePackage with a call to UpdateMockWebServerMockResponse * Use `ChangeMethodName` instead of `MethodInvocationReplacement` * Inline the `patchReturnTypeAndName` used once * Move existing recipes into `getRecipeList()` * Move replacements down to only usage * Change `methodInvocationsToAdjust` to local field * Drop unnecessary list of indices * Always carry over prefix from arg * Simplify `patchBuilderBuildReturnTypeAndName` * Use inlined `JavaType.ShallowClass.build` * Inline `patchBuilderBuildReturnTypeAndName` * Final touches * Change return type before renaming method; add missing imports --------- Co-authored-by: Jente Sondervorst <jentesondervorst@gmail.com> Co-authored-by: David Grieve <david@moderne.io> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tim te Beek <tim@moderne.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.