RED-5249: Marked utils classes with @UtilityClass and removed unused class
This commit is contained in:
parent
57796c7941
commit
84127bf77d
@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -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() {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user