Prevent instantiating utility classes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -27,6 +27,10 @@ public class CommandUtil
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(CommandUtil.class);
|
||||
|
||||
private CommandUtil() {
|
||||
throw new IllegalStateException("Utility class");
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to delete a message when a user clicks the "delete" button attached to that message.
|
||||
* This will check in the database if that user ran the command originally.
|
||||
|
@@ -12,6 +12,9 @@ import java.util.Arrays;
|
||||
public class FormatUtil
|
||||
{
|
||||
|
||||
private FormatUtil() {
|
||||
throw new IllegalStateException("Utility class");
|
||||
}
|
||||
|
||||
// cosmetic string to print on startup.
|
||||
private static final String LOGO = """
|
||||
|
@@ -10,6 +10,10 @@ import java.util.Random;
|
||||
public class RandomUtil
|
||||
{
|
||||
|
||||
private RandomUtil() {
|
||||
throw new IllegalStateException("Utility class");
|
||||
}
|
||||
|
||||
// the Random instance that we should always use when looking for an RNG based thing.
|
||||
// the seed is updated periodically, if the random.org integration is enabled.
|
||||
private static Random randomInstance = new SecureRandom();
|
||||
|
@@ -10,6 +10,10 @@ import java.util.List;
|
||||
public class SerializationUtil
|
||||
{
|
||||
|
||||
private SerializationUtil() {
|
||||
throw new IllegalStateException("Utility class");
|
||||
}
|
||||
|
||||
public static <T> String serializeBase64(List<T> dataList) {
|
||||
|
||||
try (ByteArrayOutputStream bo = new ByteArrayOutputStream();
|
||||
|
Reference in New Issue
Block a user