MessageSource.getMessage returns null default message as-is (again)
Issue: SPR-16127
This commit is contained in:
@@ -282,6 +282,9 @@ public class RequestContext {
|
||||
*/
|
||||
public String getMessage(String code, @Nullable Object[] args, String defaultMessage, boolean htmlEscape) {
|
||||
String msg = this.messageSource.getMessage(code, args, defaultMessage, this.locale);
|
||||
if (msg == null) {
|
||||
return "";
|
||||
}
|
||||
return (htmlEscape ? HtmlUtils.htmlEscape(msg) : msg);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user