Skip to content
Permalink
Browse files

Added NULL check when creating the message format using Spring

  • Loading branch information...
Leviter committed Dec 8, 2017
1 parent f549c3e commit 9e6af1414329b4c7de0c435ea0e7f3181c679aea
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/org/synyx/messagesource/InitializableMessageSource.java
@@ -100,7 +100,8 @@ protected void initializeMessages(String basename) throws RuntimeException {

for (String code : codeToMessage.keySet()) {
try {
addMessage(basename, locale, code, createMessageFormat(codeToMessage.get(code), locale));
String message = codeToMessage.get(code);
addMessage(basename, locale, code, createMessageFormat(message != null ? message : "", locale));
} catch (RuntimeException e) {
throw new MessageInitializationException(String.format(
"Error processing Message code=%s locale=%s basename=%s, %s", code, locale, basename,

0 comments on commit 9e6af14

Please sign in to comment.
You can’t perform that action at this time.