Code improvement in AbstractValidator.validate()

I’m not sure if it has changed since 3.5.4, but the code in the subject method written like this:

            if (value == null) {
                message = errorMessage.replace("{0}", "null");
            } else {
                message = errorMessage.replace("{0}", value.toString());
            }

could be more concisely written like this:

message = errorMessage.replace("{0}", String.valueOf(value));

String.valueOf() handles the null case.

You could create a
new enhancement ticket
and even provide a patch.

Thanks,
done
.