Skip to content

Commit

Permalink
Restore constructor and field used downstream
Browse files Browse the repository at this point in the history
Partially reverts 032b0eb
  • Loading branch information
timtebeek committed Feb 6, 2025
1 parent 2a3d615 commit 069f863
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package org.openrewrite.java.testing.search;

import lombok.Value;
import org.jspecify.annotations.Nullable;
import org.openrewrite.ExecutionContext;
import org.openrewrite.Preconditions;
import org.openrewrite.ScanningRecipe;
Expand All @@ -34,11 +35,16 @@

public class FindUnitTests extends ScanningRecipe<FindUnitTests.Accumulator> {

private transient @Nullable Accumulator acc = new Accumulator();
transient FindUnitTestTable unitTestTable = new FindUnitTestTable(this);

public FindUnitTests() {
}

public FindUnitTests(Accumulator acc) {
this.acc = acc;
}

@Override
public String getDisplayName() {
return "Find unit tests";
Expand Down Expand Up @@ -77,6 +83,7 @@ public static class AccumulatorValue {

@Override
public Accumulator getInitialValue(ExecutionContext ctx) {
if (acc != null) return acc;
return new Accumulator();
}

Expand Down

0 comments on commit 069f863

Please sign in to comment.