Add clearInstance method

This commit is contained in:
JeremyStar™ 2024-06-27 22:27:21 +02:00
parent 0d55b436da
commit 8c566ad46d
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -20,10 +20,10 @@
package de.staropensource.sosengine.base.utility; package de.staropensource.sosengine.base.utility;
import de.staropensource.sosengine.base.classes.Placeholder; import de.staropensource.sosengine.base.classes.Placeholder;
import de.staropensource.sosengine.base.classes.logging.LogIssuer;
import de.staropensource.sosengine.base.data.placeholders.*; import de.staropensource.sosengine.base.data.placeholders.*;
import de.staropensource.sosengine.base.logging.Logger; import de.staropensource.sosengine.base.logging.Logger;
import de.staropensource.sosengine.base.types.CodePart; import de.staropensource.sosengine.base.types.CodePart;
import de.staropensource.sosengine.base.classes.logging.LogIssuer;
import lombok.Getter; import lombok.Getter;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@ -153,4 +153,13 @@ public final class PlaceholderEngine {
public String process(@NotNull String text) { public String process(@NotNull String text) {
return process(text, new ArrayList<>()); return process(text, new ArrayList<>());
} }
/**
* Clears {@code instance}. Used in unit tests.
*
* @since 1-alpha1
*/
private static void clearInstance() {
instance = null;
}
} }