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()); } }