From 80c7ba58b2e7ef84b342c080e74ae8267fd28b8d Mon Sep 17 00:00:00 2001 From: Ori Bruk Date: Wed, 13 Nov 2024 12:02:41 +0300 Subject: [PATCH] [#25] Fix validation error Signed-off-by: Ori Bruk --- client/src/main/java/info/frostfs/sdk/utils/Validator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/main/java/info/frostfs/sdk/utils/Validator.java b/client/src/main/java/info/frostfs/sdk/utils/Validator.java index f8e2120..212debd 100644 --- a/client/src/main/java/info/frostfs/sdk/utils/Validator.java +++ b/client/src/main/java/info/frostfs/sdk/utils/Validator.java @@ -16,10 +16,11 @@ import static java.util.Objects.isNull; public class Validator { public static void validate(T object) { - StringBuilder errorMessage = new StringBuilder().append(System.lineSeparator()); + StringBuilder errorMessage = new StringBuilder(); process(object, errorMessage); if (errorMessage.length() != 0) { + errorMessage.insert(0, System.lineSeparator()); throw new ValidationFrostFSException(errorMessage.toString()); } }