Skip to content

Commit

Permalink
errorprone :: UnitTest - MethodCanBeStatic, InconsistentOverloads, No…
Browse files Browse the repository at this point in the history
…nFinalStaticField (#918)
  • Loading branch information
dev-mlb authored Sep 10, 2024
1 parent d24e1b4 commit 21442dc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/test/java/emissary/test/core/junit5/UnitTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ public abstract class UnitTest {
protected final AtomicReference<Class<?>> answerFileClassRef = new AtomicReference<>(getClass());

@TempDir
@SuppressWarnings("NonFinalStaticField")
public static File temporaryDirectory;
@SuppressWarnings("ConstantField")
@SuppressWarnings({"ConstantField", "NonFinalStaticField"})
protected static String TMPDIR = "/tmp";
@Nullable
protected Package thisPackage = null;
Expand Down Expand Up @@ -155,12 +156,12 @@ protected synchronized void useAlternateAnswerFileSource(Class<?> ansClz) {
answerFileClassRef.set(ansClz);
}

private List<String> getMyTestAnswerFiles(Class<?> ansClz) {
private static List<String> getMyTestAnswerFiles(Class<?> ansClz) {
ResourceReader rr = new ResourceReader();
return getMyTestAnswerFiles(rr, ansClz);
return getMyTestAnswerFiles(ansClz, rr);
}

private List<String> getMyTestAnswerFiles(ResourceReader resourceReader, Class<?> ansClz) {
private static List<String> getMyTestAnswerFiles(Class<?> ansClz, ResourceReader resourceReader) {
return resourceReader.findXmlResourcesFor(ansClz);
}

Expand Down

0 comments on commit 21442dc

Please sign in to comment.