RED-5249: Marked utils classes with @UtilityClass and removed unused class

This commit is contained in:
Philipp Schramm 2022-12-14 11:59:12 +01:00
parent 57796c7941
commit 84127bf77d
3 changed files with 7 additions and 32 deletions

View File

@ -1,5 +1,8 @@
package com.iqser.red.service.redaction.report.v1.server.utils;
import lombok.experimental.UtilityClass;
@UtilityClass
public final class PixelUtil {
public static final short EXCEL_COLUMN_WIDTH_FACTOR = 256;
@ -33,10 +36,4 @@ public final class PixelUtil {
return pixels;
}
private PixelUtil() {
throw new IllegalStateException("Utility class");
}
}

View File

@ -1,25 +0,0 @@
package com.iqser.red.service.redaction.report.v1.server.utils;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import lombok.experimental.UtilityClass;
@UtilityClass
public class ResourceLoader {
public byte[] load(String classpathPath) {
URL resource = ResourceLoader.class.getClassLoader().getResource(classpathPath);
if (resource == null) {
throw new IllegalArgumentException("could not load classpath resource: " + classpathPath);
}
try (InputStream is = resource.openStream()) {
return is.readAllBytes();
} catch (IOException e) {
throw new IllegalArgumentException("could not load classpath resource: " + classpathPath, e);
}
}
}

View File

@ -2,7 +2,10 @@ package com.iqser.red.service.redaction.report.v1.server.utils;
import org.apache.commons.lang3.StringUtils;
public class OsUtils {
import lombok.experimental.UtilityClass;
@UtilityClass
public final class OsUtils {
public static boolean isWindows() {