Skip to content

Commit 65f94ac

Browse files
committed
Fix serializability of FindUnitTests recipe
1 parent d4f5d15 commit 65f94ac

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/java/org/openrewrite/java/testing/search/FindUnitTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package org.openrewrite.java.testing.search;
1717

18+
import com.fasterxml.jackson.annotation.JsonIgnore;
19+
import lombok.Getter;
1820
import lombok.Value;
1921
import org.jspecify.annotations.Nullable;
2022
import org.openrewrite.ExecutionContext;
@@ -41,6 +43,8 @@ public class FindUnitTests extends ScanningRecipe<FindUnitTests.Accumulator> {
4143
public FindUnitTests() {
4244
}
4345

46+
@JsonIgnore
47+
@SuppressWarnings("unused") // used by downstream modules
4448
public FindUnitTests(Accumulator acc) {
4549
this.acc = acc;
4650
}
@@ -55,6 +59,7 @@ public String getDescription() {
5559
return "Produces a data table showing how methods are used in unit tests.";
5660
}
5761

62+
@Getter
5863
public static class Accumulator {
5964
private final Map<String, AccumulatorValue> unitTestsByKey = new HashMap<>();
6065

@@ -68,10 +73,6 @@ public void addMethodInvocation(String clazz, String testName, String testBody,
6873
}
6974
value.getMethodInvocations().add(invocation);
7075
}
71-
72-
public Map<String, AccumulatorValue> getUnitTestsByKey() {
73-
return unitTestsByKey;
74-
}
7576
}
7677

7778

0 commit comments

Comments
 (0)