Compare commits

..

No commits in common. "9ba77a2f0438a70ff3661779f7dde29031cd3d37" and "5a06d32523e60230c53fe5e3fb36db2ff0744488" have entirely different histories.

5 changed files with 8 additions and 33 deletions

View File

@ -4,7 +4,7 @@
<parent>
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-dependencies</artifactId>
<version>2.6.0-SNAPSHOT</version>
<version>2.5.0-SNAPSHOT</version>
</parent>
<artifactId>haiti-exception</artifactId>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-dependencies</artifactId>
<version>2.6.0-SNAPSHOT</version>
<version>2.5.0-SNAPSHOT</version>
</parent>
<name>Haiti Utils</name>

View File

@ -92,14 +92,6 @@ public final class Checker {
return EMPTY.equals(s);
}
public static boolean checkNotBlank(String s) {
return checkNotNull(s) && !s.isBlank();
}
public static boolean checkBlank(String s) {
return checkNull(s) || s.isBlank();
}
public static boolean checkFalse(Boolean b) {
return b != null && !b;
}

View File

@ -3,9 +3,7 @@ package dev.struchkov.haiti.utils;
import java.util.Collection;
import java.util.function.Supplier;
import static dev.struchkov.haiti.utils.Checker.checkBlank;
import static dev.struchkov.haiti.utils.Checker.checkEmpty;
import static dev.struchkov.haiti.utils.Checker.checkNotBlank;
import static dev.struchkov.haiti.utils.Checker.checkNotEmpty;
import static dev.struchkov.haiti.utils.Checker.checkNotNull;
import static dev.struchkov.haiti.utils.Checker.checkNull;
@ -108,11 +106,9 @@ public final class Inspector {
* @throws RuntimeException
*/
public static void isNotEmpty(Supplier<? extends RuntimeException> exception, Object... args) {
if (checkEmpty(args)) throw exception.get();
}
public static void isNotEmpty(String s, Supplier<? extends RuntimeException> exception) {
if (checkEmpty(s)) throw exception.get();
if (checkEmpty(args)) {
throw exception.get();
}
}
/**
@ -125,10 +121,6 @@ public final class Inspector {
if (checkNotEmpty(collection)) throw exception.get();
}
public static void isEmpty(String s, Supplier<? extends RuntimeException> exception) {
if (checkNotEmpty(s)) throw exception.get();
}
/**
* Проверка массива на пустоту. Если массив не пустой и не null, то будет выбрашено исключение.
*
@ -139,19 +131,10 @@ public final class Inspector {
if (checkNotEmpty(args)) throw exception.get();
}
public static void isNotBlank(String s, Supplier<? extends RuntimeException> exception) {
if (checkBlank(s)) throw exception.get();
}
public static void isBlank(String s, Supplier<? extends RuntimeException> exception) {
if (checkNotBlank(s)) throw exception.get();
}
/**
* Утилитарный класс.
*/
public static final class Utils {
private Utils() {
utilityClass();
}

View File

@ -4,7 +4,7 @@
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-dependencies</artifactId>
<version>2.6.0-SNAPSHOT</version>
<version>2.5.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Haiti Framework</name>
@ -50,12 +50,12 @@
<dependency>
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-exception</artifactId>
<version>2.6.0-SNAPSHOT</version>
<version>2.5.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-utils</artifactId>
<version>2.6.0-SNAPSHOT</version>
<version>2.5.0-SNAPSHOT</version>
</dependency>
<dependency>