forked from TrueCloudLab/frostfs-sdk-java
parent
694bb963e4
commit
80c7ba58b2
1 changed files with 2 additions and 1 deletions
|
@ -16,10 +16,11 @@ import static java.util.Objects.isNull;
|
||||||
|
|
||||||
public class Validator {
|
public class Validator {
|
||||||
public static <T> void validate(T object) {
|
public static <T> void validate(T object) {
|
||||||
StringBuilder errorMessage = new StringBuilder().append(System.lineSeparator());
|
StringBuilder errorMessage = new StringBuilder();
|
||||||
process(object, errorMessage);
|
process(object, errorMessage);
|
||||||
|
|
||||||
if (errorMessage.length() != 0) {
|
if (errorMessage.length() != 0) {
|
||||||
|
errorMessage.insert(0, System.lineSeparator());
|
||||||
throw new ValidationFrostFSException(errorMessage.toString());
|
throw new ValidationFrostFSException(errorMessage.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue