File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/main/resources/META-INF/rewrite Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -2101,6 +2101,29 @@ examples:
2101
2101
language: java
2102
2102
---
2103
2103
type : specs.openrewrite.org/v1beta/example
2104
+ recipeName : org.openrewrite.staticanalysis.RemoveRedundantNullCheckBeforeInstanceof
2105
+ examples :
2106
+ - description : ' '
2107
+ sources :
2108
+ - before : |
2109
+ class A {
2110
+ void foo(String s) {
2111
+ if (s != null && s instanceof String) {
2112
+ System.out.println("String value: " + s);
2113
+ }
2114
+ }
2115
+ }
2116
+ after: |
2117
+ class A {
2118
+ void foo(String s) {
2119
+ if (s instanceof String) {
2120
+ System.out.println("String value: " + s);
2121
+ }
2122
+ }
2123
+ }
2124
+ language: java
2125
+ ---
2126
+ type : specs.openrewrite.org/v1beta/example
2104
2127
recipeName : org.openrewrite.staticanalysis.RemoveRedundantTypeCast
2105
2128
examples :
2106
2129
- description : ' '
You can’t perform that action at this time.
0 commit comments