/** * Escapes the given property value. This method is called on saving the * configuration for each property value. It ensures a correct handling of * backslash characters and also takes care that list delimiter characters * in the value are escaped. * * @param value the property value * @param inList a flag whether the value is part of a list * @param transformer the {@code ValueTransformer} * @return the escaped property value */ protected String escapeValue(final Object value, final boolean inList, final ValueTransformer transformer) { String escapedValue = String.valueOf(transformer.transformValue(escapeBackslashs( value, inList))); if (getDelimiter() != 0) { escapedValue = StringUtils.replace(escapedValue, String.valueOf(getDelimiter()), ESCAPE + getDelimiter()); } return escapedValue; }