Releases: openrewrite/rewrite-static-analysis
Releases · openrewrite/rewrite-static-analysis
Release list
2.38.0
What's Changed
- Fix
UseTryWithResourcesmoving resource out of scope for catch block by @timtebeek in #921 - Fix
MinimumSwitchCasescrash on Java 21 sealed-interface pattern switch by @timtebeek in #922 - Fix RemoveUnusedPrivateMethods deleting methods called with raw collection arguments by @habiibullahm in #898
- Add UseStringCaseInsensitiveOrder by @steve-aom-elliott in #923
- Add 7 cross-language code quality recipes by @jkschneider in #853
- Fix
RemoveRedundantTypeCastremoving cast that gives avarlambda its target type by @timtebeek in #925 - Tests for Kotlin, Groovy, TS for cross-language code quality recipes by @greg-at-moderne in #928
- Add RemoveUnreachableMultiCatchAlternative by @steve-aom-elliott in #926
- Use unnamed variable for unused try-with-resources resource on Java 21+ by @timtebeek in #930
New Contributors
- @habiibullahm made their first contribution in #898
Full Changelog: v2.37.0...v2.38.0
2.37.0
What's Changed
- Preserve raw supertype cast on parameterized argument in
RemoveRedundantTypeCastby @timtebeek in #915 - Preserve space when InstanceOfPatternMatch replaces a cast after a keyword by @timtebeek in #913
InstanceOfPatternMatchnot to remove double primitive cast by @greg-at-moderne in #918- Fix UseDiamondOperator throwing array index out of bounds when operating on a varargs method by @sambsnyd in #919
- Fix false positive in
AnnotateNullableParameterswhen parameter der… by @stefanodallapalma in #868
Full Changelog: v2.36.0...v2.37.0
2.36.0
What's Changed
- Guard
instanceoftoClass::isInstanceconversion on lambda arity by @timtebeek in #903 - Preserve cast on argument to overloaded method in
RemoveRedundantTypeCastby @timtebeek in #904 - Preserve raw cast on parameterized expression in
RemoveRedundantTypeCastby @timtebeek in #905 - Skip Python sources in
CombineSemanticallyEqualCatchBlocksby @timtebeek in #908 - Use receiver type for unbound instance method reference in
ReplaceLambdaWithMethodReferenceby @timtebeek in #909 - Regenerate recipes.csv by @timtebeek in #910
- Retain load-bearing type witness in select position in
UnnecessaryExplicitTypeArgumentsby @knutwannheden in #911
Full Changelog: v2.35.0...v2.36.0
2.35.0
What's Changed
- Document identity-semantics caveat on PrimitiveWrapperClassConstructorToValueOf by @timtebeek in #883
- Skip
FinalClasswhen class has anonymous inner subclasses by @timtebeek in #886 - Skip
ReplaceLambdaWithMethodReferencefor parameterized types with multiple constructors by @timtebeek in #887 - Preserve
nullcast at varargs position inRemoveRedundantTypeCastby @timtebeek in #888 - Retain explicit type arguments on no-arg static methods in
UnnecessaryExplicitTypeArgumentsby @timtebeek in #889 - Detect overloads on parameterized receiver in
hasMethodOverloadingby @timtebeek in #890 - Preserve cast on generic method invocation in overloaded outer call by @timtebeek in #891
- Guard cast to
JavaType.AnnotationinReorderAnnotationsby @timtebeek in #894 - Strip diamond operator from cast in
UseLambdaForFunctionalInterfaceby @timtebeek in #893 - Replace
varwith interface type inUseLambdaForFunctionalInterfaceby @timtebeek in #896
Full Changelog: v2.34.1...v2.35.0
v2.34.1
What's Changed
- OpenRewrite v8.81.6
- Preserve statement order in
UseTryWithResourcesby @timtebeek in #866 - Skip meta-annotated
@ConfigurationinFinalClassandHideUtilityClassConstructorby @timtebeek in #867 - OpenRewrite recipe best practices by @timtebeek in #869
- Revert to using rewrite-java-21 for test runtime by @timtebeek in #870
- Preserve casts pinning generic-method return type in lambdas by @timtebeek in #872
- Preserve
(Object)bridge cast for unchecked generic casts by @timtebeek in #876 - Skip
Objects::nonNull/isNullwhen lambda parameter does not match by @timtebeek in #875 - Regression tests for ReplaceStackWithDeque ControlFlow crashes by @knutwannheden in #879
- Skip
SimplifyConsecutiveAssignmentswhen initializer would self-reference by @timtebeek in #882
Full Changelog: v2.34.0...v2.34.1
2.34.0
What's Changed
- bugfix: false positive in AnnotateNullableParameters when parameter … by @stefanodallapalma in #865
Full Changelog: v2.33.0...v2.34.0
2.33.1
2.33.0
What's Changed
- A new test case for
SimplifyBooleanExpressionby @greg-at-moderne in #848 InstanceOfPatternMatchto avoid providing invalid variable definitions pointing to itself by @greg-at-moderne in #849- Enrich recipe descriptions with rationale by @jkschneider in #850
- Fix EmptyBlock, FinalClass, HideUtilityClassConstructor; add regression tests by @timtebeek in #851
- Fix switch-related recipe bugs (#6, #9, #14, #687) by @timtebeek in #852
- Add space after // in single-line comments by @avimta in #854
- Fix InstanceOfPatternMatch duplicate pattern variable names with flow scoping by @timtebeek in #855
- Fix RenameExceptionInEmptyCatch crash on Kotlin/Groovy files by @timtebeek in #856
- Fix FinalizeLocalVariables crash on Kotlin/Groovy top-level variables by @timtebeek in #857
- Fix UnnecessaryExplicitTypeArguments within lambda return statements by @timtebeek in #858
- Add SillyEqualsCheck recipe (RSPEC-S2159) by @timtebeek in #834
- Add RemoveUnusedLabels recipe (RSPEC-S1065) by @timtebeek in #835
- Add S2209/S3252 recipe: Static members via class name by @timtebeek in #836
- Add S1185 recipe: Remove methods that only call super by @timtebeek in #837
- NeedBraces: add test for if-else, fix do-while by @greg-at-moderne in #859
- Add tests confirming #20 is fixed by @greg-at-moderne in #860
- Handle chained addition in PreferIncrementOperator by @greg-at-moderne in #816
- Fix UnnecessaryCatch for nested try-with-resources close() by @timtebeek in #863
- Fix FinalizePrivateFields breaking code with lambda reads in field initializers by @timtebeek in #862
- Regression test for
ReplaceStackWithDequecrash onthisargument by @knutwannheden in #864
New Contributors
Full Changelog: v2.32.0...v2.33.0
2.32.0
What's Changed
- Remove @disabled tests in
ReplaceStackWithDequeTestby @greg-at-moderne in #840 - A couple of test cases in
RemoveExtraSemicolonsTestare no longer expected to fail by @greg-at-moderne in #841 - Fix compilation after new args added to Cs.CompilationUnit by @greg-at-moderne in #842
- Improve AnnotateNullableParameters to avoid duplicate annotations and annotation placement issues by @stefanodallapalma in #843
- Inline JavaTemplate fields at call sites by @timtebeek in #844
- Use
JavaTemplate.apply()static method by @timtebeek in #846 - Improve AnnotateNullableMethods to avoid duplicate annotations and annotation placement issues by @stefanodallapalma in #845
- Skip
InstanceOfPatternMatchfor try-with-resources casts by @timtebeek in #847
Full Changelog: v2.31.0...v2.32.0
2.31.0
What's Changed
- Add InterruptedExceptionHandling recipe (RSPEC-S2142) by @timtebeek in #838
- Add ExplicitThis recipe to make
this.prefix explicit. by @motlin in #791 - SimplifyBooleanExpression: skip nullable boolean comparisons in Kotlin by @timtebeek in #839
Full Changelog: v2.30.1...v2.31.0