File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/main/java/org/openrewrite/java/testing/search Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1616package org .openrewrite .java .testing .search ;
1717
1818import lombok .Value ;
19+ import org .jspecify .annotations .Nullable ;
1920import org .openrewrite .ExecutionContext ;
2021import org .openrewrite .Preconditions ;
2122import org .openrewrite .ScanningRecipe ;
3435
3536public class FindUnitTests extends ScanningRecipe <FindUnitTests .Accumulator > {
3637
38+ private transient @ Nullable Accumulator acc = new Accumulator ();
3739 transient FindUnitTestTable unitTestTable = new FindUnitTestTable (this );
3840
3941 public FindUnitTests () {
4042 }
4143
44+ public FindUnitTests (Accumulator acc ) {
45+ this .acc = acc ;
46+ }
47+
4248 @ Override
4349 public String getDisplayName () {
4450 return "Find unit tests" ;
@@ -77,6 +83,7 @@ public static class AccumulatorValue {
7783
7884 @ Override
7985 public Accumulator getInitialValue (ExecutionContext ctx ) {
86+ if (acc != null ) return acc ;
8087 return new Accumulator ();
8188 }
8289
You can’t perform that action at this time.
0 commit comments