io.github.nejckorasa.s3.upload.Assertions Maven / Gradle / Ivy
package io.github.nejckorasa.s3.upload;
import lombok.experimental.UtilityClass;
import java.util.function.Supplier;
@UtilityClass
class Assertions {
static void assertNotBlank(String str, String errorMessage) {
assertOrThrow(() -> str == null || str.isBlank(), errorMessage);
}
static void assertOrThrow(Supplier assertion, String errorMessage) {
if (assertion.get()) {
throw new IllegalStateException(errorMessage);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy