Rename constant WHITESPACE

Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
This commit is contained in:
Melanie Retter
2016-08-25 10:39:50 +02:00
parent d84365e3d2
commit 34daea319c

View File

@@ -26,7 +26,7 @@ public class ConstraintViolationException extends AbstractServerRtException {
private static final long serialVersionUID = 1L;
private static final String WHITESPACE = " ";
private static final String MESSAGE_FORMATTER_SEPARATOR = " ";
/**
* Constructor for {@link ConstraintViolationException}
@@ -52,9 +52,9 @@ public class ConstraintViolationException extends AbstractServerRtException {
final Set<ConstraintViolation<?>> violations = ex.getConstraintViolations();
final List<String> messages = new ArrayList<>();
violations.stream().forEach(
violation -> messages.add(violation.getPropertyPath() + WHITESPACE + violation.getMessage() + "."));
violation -> messages.add(violation.getPropertyPath() + MESSAGE_FORMATTER_SEPARATOR + violation.getMessage() + "."));
return messages.stream().collect(Collectors.joining(WHITESPACE));
return messages.stream().collect(Collectors.joining(MESSAGE_FORMATTER_SEPARATOR));
}
}