@Override public String resolve(final RuleResultDetail detail) { final String key = detail.getErrorCode(); final String message = getMessage(key); final String format; if (message != null) { format = String.format(message, detail.getValues()); } else { if (!detail.getParameters().isEmpty()) { format = String.format("%s:%s", key, detail.getParameters()); } else { format = String.format("%s", key); } } return format; } }