@@ -471,6 +471,30 @@ examples:
471471 language: java
472472 ---
473473type : specs.openrewrite.org/v1beta/example
474+ recipeName : org.openrewrite.staticanalysis.CustomImportOrder
475+ examples :
476+ - description : ' '
477+ sources :
478+ - before : |
479+ package com.example;
480+
481+ import org.apache.commons.lang3.StringUtils;
482+ import java.util.Collections;
483+ import static java.util.Collections.*;
484+
485+ class Test {}
486+ after: |
487+ package com.example;
488+
489+ import static java.util.Collections.*;
490+
491+ import java.util.Collections;
492+ import org.apache.commons.lang3.StringUtils;
493+
494+ class Test {}
495+ language: java
496+ ---
497+ type : specs.openrewrite.org/v1beta/example
474498recipeName : org.openrewrite.staticanalysis.DeclarationSiteTypeVariance
475499examples :
476500- description : ' '
@@ -633,23 +657,6 @@ examples:
633657type : specs.openrewrite.org/v1beta/example
634658recipeName : org.openrewrite.staticanalysis.ExplicitInitialization
635659examples :
636- - description : ' '
637- sources :
638- - before : |
639- class A {
640- // C#: int? a
641- Nullable<Integer> a = null;
642- // C#: int? a = 0
643- Nullable<Integer> a = new Nullable<>(0);
644- }
645- after: |
646- class A {
647- // C#: int? a
648- Nullable<Integer> a;
649- // C#: int? a = 0
650- Nullable<Integer> a = new Nullable<>(0);
651- }
652- language: java
653660- description : ' '
654661 sources :
655662 - before : |
@@ -695,6 +702,23 @@ examples:
695702 private final Long n = null;
696703 }
697704 language: java
705+ - description : ' '
706+ sources :
707+ - before : |
708+ class A {
709+ // C#: int? a
710+ Nullable<Integer> a = null;
711+ // C#: int? a = 0
712+ Nullable<Integer> a = new Nullable<>(0);
713+ }
714+ after: |
715+ class A {
716+ // C#: int? a
717+ Nullable<Integer> a;
718+ // C#: int? a = 0
719+ Nullable<Integer> a = new Nullable<>(0);
720+ }
721+ language: java
698722 ---
699723type : specs.openrewrite.org/v1beta/example
700724recipeName : org.openrewrite.staticanalysis.ExplicitLambdaArgumentTypes
@@ -1584,6 +1608,8 @@ type: specs.openrewrite.org/v1beta/example
15841608recipeName : org.openrewrite.staticanalysis.NoFinalizedLocalVariables
15851609examples :
15861610- description : ' '
1611+ parameters :
1612+ - ' null'
15871613 sources :
15881614 - before : |
15891615 import java.util.function.Supplier;
@@ -2772,18 +2798,6 @@ examples:
27722798type : specs.openrewrite.org/v1beta/example
27732799recipeName : org.openrewrite.staticanalysis.SimplifyBooleanExpression
27742800examples :
2775- - description : ' '
2776- sources :
2777- - before : |
2778- fun getSymbol() : String? {
2779- return null
2780- }
2781- language: kotlin
2782- - before : |
2783- val isPositive = getSymbol().equals("+") == true
2784- after: |
2785- val isPositive = getSymbol().equals("+")
2786- language: kotlin
27872801- description : ' '
27882802 sources :
27892803 - before : |
@@ -2803,6 +2817,18 @@ examples:
28032817 }
28042818 }
28052819 language: java
2820+ - description : ' '
2821+ sources :
2822+ - before : |
2823+ fun getSymbol() : String? {
2824+ return null
2825+ }
2826+ language: kotlin
2827+ - before : |
2828+ val isPositive = getSymbol().equals("+") == true
2829+ after: |
2830+ val isPositive = getSymbol().equals("+")
2831+ language: kotlin
28062832 ---
28072833type : specs.openrewrite.org/v1beta/example
28082834recipeName : org.openrewrite.staticanalysis.SimplifyBooleanReturn
0 commit comments