-
Notifications
You must be signed in to change notification settings - Fork 99
Comparing changes
Open a pull request
base repository: openrewrite/rewrite-static-analysis
base: v2.34.0
head repository: openrewrite/rewrite-static-analysis
compare: v2.34.1
- 10 commits
- 23 files changed
- 4 contributors
Commits on Apr 28, 2026
-
Preserve statement order in
UseTryWithResources(#866)Refuse to merge a `close()` into try-with-resources when non-close statements precede it in the finally block. Try-with-resources runs the auto-close before the finally, so those statements would otherwise move from before to after the close, changing semantics.
Configuration menu - View commit details
-
Copy full SHA for ab8ff8d - Browse repository at this point
Copy the full SHA ab8ff8dView commit details -
Skip meta-annotated
@ConfigurationinFinalClassand `HideUtility……ClassConstructor` (#867) Enables meta-annotation matching so classes annotated with `@TestConfiguration`, `@SpringBootApplication`, and any user-defined stereotype layered on top of `@Configuration` are also skipped.
Configuration menu - View commit details
-
Copy full SHA for d3e09e9 - Browse repository at this point
Copy the full SHA d3e09e9View commit details
Commits on Apr 29, 2026
-
OpenRewrite recipe best practices
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.recipes.rewrite.OpenRewriteRecipeBestPractices?organizationId=QUxML01vZGVybmUvTW9kZXJuZSArIE9wZW5SZXdyaXRl Co-authored-by: Moderne <team@moderne.io>
Configuration menu - View commit details
-
Copy full SHA for 98d350e - Browse repository at this point
Copy the full SHA 98d350eView commit details
Commits on Apr 30, 2026
-
OpenRewrite recipe best practices (#869)
* OpenRewrite recipe best practices Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.recipes.rewrite.OpenRewriteRecipeBestPractices?organizationId=QUxML01vZGVybmUvTW9kZXJuZSArIE9wZW5SZXdyaXRl Co-authored-by: Moderne <team@moderne.io> * Use rewrite-java-25 test runtime, revert preview-feature unnamed lambda parameters `_` unnamed variables are still a preview feature when compiled without `--enable-preview`, so the recipe-best-practices run that introduced `_ ->` broke `compileTestJava`. Revert those two lambda parameters back to `cu ->` and bump the test runtime parser to rewrite-java-25. --------- Co-authored-by: Moderne <team@moderne.io>
Configuration menu - View commit details
-
Copy full SHA for 30a60ba - Browse repository at this point
Copy the full SHA 30a60baView commit details
Commits on May 1, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 9f02852 - Browse repository at this point
Copy the full SHA 9f02852View commit details
Commits on May 4, 2026
-
Preserve casts pinning generic-method return type in lambdas (#872)
Without the cast, calls like `<T extends SourceFile> T withSourcePath(Path)` inside a lambda lose `T` to its bound during outer inference (e.g. `Optional.map(...).ifPresent(generated::add)`), causing compilation errors. Fixes #871
Configuration menu - View commit details
-
Copy full SHA for d2bf703 - Browse repository at this point
Copy the full SHA d2bf703View commit details
Commits on May 5, 2026
-
Preserve
(Object)bridge cast for unchecked generic casts (#876)* Preserve `(Object)` bridge cast for unchecked generic casts When a cast is wrapped by another cast and neither the outer cast type nor the inner expression type are assignable to one another, the inner cast is acting as a bridge for an unchecked generic conversion (e.g. `(List<String>) (Object) values`). Removing it leaves a direct cast that does not compile. * Always preserve a cast nested inside another cast The earlier "neither type assignable to the other" check leaves room for edge cases. If a developer wrote two casts they almost always had a reason — bridge cast, primitive widen-then-narrow, controlling overload resolution — so just preserve. Also skip both `J.Parentheses` and `J.ControlParentheses` when walking up so parenthesized variants are covered.
Configuration menu - View commit details
-
Copy full SHA for 209f642 - Browse repository at this point
Copy the full SHA 209f642View commit details -
Skip
Objects::nonNull/isNullwhen lambda parameter does not match (……#875) The recipe previously transformed `() -> field != null` into `Objects::nonNull` even when the lambda had no parameter or the null check referred to a captured field rather than the lambda parameter, producing code that no longer compiled.
Configuration menu - View commit details
-
Copy full SHA for 095656f - Browse repository at this point
Copy the full SHA 095656fView commit details
Commits on May 6, 2026
-
Add regression tests for
ReplaceStackWithDequeagainst `ControlFlow……` crashes (#879) Two minimized repros for the `ControlFlowIllegalStateException`s observed in flagship runs against `moderneinc/moderne-intellij-plugin` (Kotlin), `moderneinc/rewrite-sql`, and `openrewrite/rewrite-templating`: - Anonymous class body containing multiple methods whose bodies returned (Java) — `No current node!`. - Kotlin expression-body function whose `||` operands are Boolean-typed (`kotlin.Boolean`) — `Condition Node is not a guard!`. The underlying analyzer fix lives in `openrewrite/rewrite-analysis`. The Kotlin test ends up replacing `Stack` with `Deque` because the function only returns the boolean, not the stack — so we just assert that the recipe runs to completion.
Configuration menu - View commit details
-
Copy full SHA for d8acf8b - Browse repository at this point
Copy the full SHA d8acf8bView commit details -
Skip
SimplifyConsecutiveAssignmentswhen initializer would self-ref……erence (#882) When the first statement is a variable declaration and the following compound assignment's right-hand side references the variable being declared, folding produced an initializer that read the variable before it was assigned, e.g. `int result = state ^ result >>> 1;`.
Configuration menu - View commit details
-
Copy full SHA for 7ba220a - Browse repository at this point
Copy the full SHA 7ba220aView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v2.34.0...v2.34.1