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 @@ -2242,6 +2242,29 @@ examples:
22422242 language: java
22432243 ---
22442244type : specs.openrewrite.org/v1beta/example
2245+ recipeName : org.openrewrite.staticanalysis.RemoveRedundantNullCheckBeforeLiteralEquals
2246+ examples :
2247+ - description : ' '
2248+ sources :
2249+ - before : |
2250+ class A {
2251+ void foo(String s) {
2252+ if (s != null && "test".equals(s)) {
2253+ System.out.println("String matches");
2254+ }
2255+ }
2256+ }
2257+ after: |
2258+ class A {
2259+ void foo(String s) {
2260+ if ("test".equals(s)) {
2261+ System.out.println("String matches");
2262+ }
2263+ }
2264+ }
2265+ language: java
2266+ ---
2267+ type : specs.openrewrite.org/v1beta/example
22452268recipeName : org.openrewrite.staticanalysis.RemoveRedundantTypeCast
22462269examples :
22472270- description : ' '
You can’t perform that action at this time.
0 commit comments