From fb9d8a0f6e7444b3ba433ef688ae58550f544edd Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 30 Jul 2022 10:32:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=BE=D0=B9=20=D1=80=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- haiti-bom/pom.xml | 4 ++-- haiti-context/pom.xml | 2 +- haiti-core/pom.xml | 2 +- haiti-exception/pom.xml | 2 +- .../haiti/context/exception/AccessException.java | 2 +- .../haiti/context/exception/ConvertException.java | 2 +- .../haiti/context/exception/CreateException.java | 2 +- haiti-filter/pom.xml | 2 +- haiti-utils/pom.xml | 2 +- .../src/main/java/dev/struchkov/haiti/utils/Checker.java | 9 +++++++++ pom.xml | 4 ++-- 11 files changed, 21 insertions(+), 12 deletions(-) diff --git a/haiti-bom/pom.xml b/haiti-bom/pom.xml index 52311d5..334d31f 100644 --- a/haiti-bom/pom.xml +++ b/haiti-bom/pom.xml @@ -6,7 +6,7 @@ dev.struchkov.haiti haiti-bom - 1.2.0 + 1.3.0 pom Haiti BOM @@ -30,7 +30,7 @@ UTF-8 UTF-8 - 1.2.0 + ${project.version} ${haiti.ver} ${haiti.ver} diff --git a/haiti-context/pom.xml b/haiti-context/pom.xml index e8e5e90..abc88ef 100644 --- a/haiti-context/pom.xml +++ b/haiti-context/pom.xml @@ -6,7 +6,7 @@ dev.struchkov.haiti haiti - 1.2.0 + 1.3.0 haiti-context diff --git a/haiti-core/pom.xml b/haiti-core/pom.xml index 4f0d2d1..691b423 100644 --- a/haiti-core/pom.xml +++ b/haiti-core/pom.xml @@ -6,7 +6,7 @@ dev.struchkov.haiti haiti - 1.2.0 + 1.3.0 haiti-core diff --git a/haiti-exception/pom.xml b/haiti-exception/pom.xml index 3998d30..e31d9e2 100644 --- a/haiti-exception/pom.xml +++ b/haiti-exception/pom.xml @@ -6,7 +6,7 @@ dev.struchkov.haiti haiti - 1.2.0 + 1.3.0 haiti-exception diff --git a/haiti-exception/src/main/java/dev/struchkov/haiti/context/exception/AccessException.java b/haiti-exception/src/main/java/dev/struchkov/haiti/context/exception/AccessException.java index 83152b0..dd79ed0 100644 --- a/haiti-exception/src/main/java/dev/struchkov/haiti/context/exception/AccessException.java +++ b/haiti-exception/src/main/java/dev/struchkov/haiti/context/exception/AccessException.java @@ -12,7 +12,7 @@ public class AccessException extends BasicException { super(message); } - public static Supplier supplier(String message, Object... objects) { + public static Supplier accessException(String message, Object... objects) { return () -> new AccessException(MessageFormat.format(message, objects)); } diff --git a/haiti-exception/src/main/java/dev/struchkov/haiti/context/exception/ConvertException.java b/haiti-exception/src/main/java/dev/struchkov/haiti/context/exception/ConvertException.java index 6b8488a..c70d803 100644 --- a/haiti-exception/src/main/java/dev/struchkov/haiti/context/exception/ConvertException.java +++ b/haiti-exception/src/main/java/dev/struchkov/haiti/context/exception/ConvertException.java @@ -16,7 +16,7 @@ public class ConvertException extends BasicException { super(message, cause); } - public static Supplier supplier(String message, Object... objects) { + public static Supplier convertException(String message, Object... objects) { return () -> new ConvertException(MessageFormat.format(message, objects)); } diff --git a/haiti-exception/src/main/java/dev/struchkov/haiti/context/exception/CreateException.java b/haiti-exception/src/main/java/dev/struchkov/haiti/context/exception/CreateException.java index 479f6f0..04d8e0f 100644 --- a/haiti-exception/src/main/java/dev/struchkov/haiti/context/exception/CreateException.java +++ b/haiti-exception/src/main/java/dev/struchkov/haiti/context/exception/CreateException.java @@ -12,7 +12,7 @@ public class CreateException extends BasicException { super(message); } - public static Supplier supplier(String message, Object... objects) { + public static Supplier createException(String message, Object... objects) { return () -> new CreateException(MessageFormat.format(message, objects)); } diff --git a/haiti-filter/pom.xml b/haiti-filter/pom.xml index 804968d..00210be 100644 --- a/haiti-filter/pom.xml +++ b/haiti-filter/pom.xml @@ -6,7 +6,7 @@ dev.struchkov.haiti haiti - 1.2.0 + 1.3.0 haiti-filter diff --git a/haiti-utils/pom.xml b/haiti-utils/pom.xml index f29d5eb..b5a1a6e 100644 --- a/haiti-utils/pom.xml +++ b/haiti-utils/pom.xml @@ -6,7 +6,7 @@ dev.struchkov.haiti haiti - 1.2.0 + 1.3.0 Haiti Utils diff --git a/haiti-utils/src/main/java/dev/struchkov/haiti/utils/Checker.java b/haiti-utils/src/main/java/dev/struchkov/haiti/utils/Checker.java index a2a188c..978c600 100644 --- a/haiti-utils/src/main/java/dev/struchkov/haiti/utils/Checker.java +++ b/haiti-utils/src/main/java/dev/struchkov/haiti/utils/Checker.java @@ -3,6 +3,7 @@ package dev.struchkov.haiti.utils; import java.util.Collection; import static dev.struchkov.haiti.utils.Exceptions.utilityClass; +import static dev.struchkov.haiti.utils.Strings.EMPTY; public final class Checker { @@ -40,6 +41,10 @@ public final class Checker { } } + public static boolean checkNotEmpty(String s) { + return !EMPTY.equals(s); + } + /** * Проверка коллекции на пустоту. * @@ -58,6 +63,10 @@ public final class Checker { return args == null || args.length == 0; } + public static boolean checkEmpty(String s) { + return EMPTY.equals(s); + } + public static boolean checkLong(String s) { try { Long.parseLong(s); diff --git a/pom.xml b/pom.xml index ef96f12..02450cb 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ dev.struchkov.haiti haiti - 1.2.0 + 1.3.0 pom Haiti Framework @@ -39,7 +39,7 @@ UTF-8 UTF-8 - 1.2.0 + 1.3.0 ${haiti.ver} ${haiti.ver}