/**
 * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 */
package org.eclipse.hawkbit.repository.exception;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

import javax.validation.ConstraintViolation;

import org.eclipse.hawkbit.exception.AbstractServerRtException;
import org.eclipse.hawkbit.exception.SpServerError;

/**
 * the {@link ConstraintViolationException} is thrown when an entity is tried to
 * be saved which has constraint violations
 */
public class ConstraintViolationException extends AbstractServerRtException {

    private static final long serialVersionUID = 1L;

    private static final String WHITESPACE = " ";

    /**
     * Constructor for {@link ConstraintViolationException}
     * 
     * @param ex
     *            the javax.validation.ConstraintViolationException which is
     *            thrown
     */
    public ConstraintViolationException(final javax.validation.ConstraintViolationException ex) {
        super(getExceptionMessage(ex), SpServerError.SP_REPO_CONSTRAINT_VIOLATION);
    }

    /**
     * Uses the information of
     * {@link javax.validation.ConstraintViolationException} to provide a proper
     * error message for {@link ConstraintViolationException}
     * 
     * @param ex
     *            javax.validation.ConstraintViolationException which is thrown
     * @return message String with proper error information
     */
    public static String getExceptionMessage(final javax.validation.ConstraintViolationException ex) {
        final Set<ConstraintViolation<?>> violations = ex.getConstraintViolations();
        final List<String> messages = new ArrayList<>();
        violations.stream().forEach(
                violation -> messages.add(violation.getPropertyPath() + WHITESPACE + violation.getMessage() + "."));

        return messages.stream().collect(Collectors.joining(WHITESPACE));
    }

}

@@ -938,26 +938,43 @@
  String 
-WHITESPACE
+MESSAGE_FORMATTER_SEPARATOR
  = %22 %22;%0A
@@ -2075,26 +2075,43 @@
 ath() + 
-WHITESPACE
+MESSAGE_FORMATTER_SEPARATOR
  + viola
@@ -2202,18 +2202,35 @@
 ing(
-WHITESPACE
+MESSAGE_FORMATTER_SEPARATOR
 ));%0A

Rename constant WHITESPACE