Improve various small code quality issues
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:
@@ -70,7 +70,9 @@ public class FormatUtil
|
||||
if(hours == 0)
|
||||
{
|
||||
if(minutes == 0)
|
||||
{} else { // i know this if has an empty body but i feel like this reads better
|
||||
{
|
||||
// empty code block because it makes the code easier to read
|
||||
} else {
|
||||
uptimeStringBuilder.append(minutes).append("m ");
|
||||
}
|
||||
} else {
|
||||
|
@@ -5,8 +5,8 @@ import java.time.format.DateTimeFormatter;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Deprecated
|
||||
public class Logger
|
||||
@Deprecated(since = "0.5.16", forRemoval = true)
|
||||
public class Logger<T>
|
||||
{
|
||||
|
||||
// objects that we need to have for a properly formatted message
|
||||
@@ -17,7 +17,7 @@ public class Logger
|
||||
|
||||
|
||||
// when initializing a new logger, save variables in that instance
|
||||
public Logger(Class logClass)
|
||||
public Logger(Class<T> logClass)
|
||||
{
|
||||
className = logClass.getSimpleName();
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
public class SerializationUtil
|
||||
{
|
||||
|
||||
public static String serializeBase64(List dataList) {
|
||||
public static <T> String serializeBase64(List<T> dataList) {
|
||||
|
||||
try (ByteArrayOutputStream bo = new ByteArrayOutputStream();
|
||||
ObjectOutputStream so = new ObjectOutputStream(bo)) {
|
||||
@@ -23,7 +23,7 @@ public class SerializationUtil
|
||||
}
|
||||
}
|
||||
|
||||
public static LinkedList deserializeBase64(String dataStr) {
|
||||
public static <T> LinkedList<T> deserializeBase64(String dataStr) {
|
||||
|
||||
byte[] b = Base64.getDecoder().decode(dataStr);
|
||||
ByteArrayInputStream bi = new ByteArrayInputStream(b);
|
||||
|
Reference in New Issue
Block a user