diff --git a/microsphere-i18n-core/src/main/java/io/microsphere/i18n/PropertiesResourceServiceMessageSource.java b/microsphere-i18n-core/src/main/java/io/microsphere/i18n/PropertiesResourceServiceMessageSource.java index b382daf..d7d1588 100644 --- a/microsphere-i18n-core/src/main/java/io/microsphere/i18n/PropertiesResourceServiceMessageSource.java +++ b/microsphere-i18n-core/src/main/java/io/microsphere/i18n/PropertiesResourceServiceMessageSource.java @@ -11,6 +11,7 @@ import static io.microsphere.collection.CollectionUtils.isEmpty; import static io.microsphere.text.FormatUtils.format; +import static java.util.Collections.emptyMap; import static java.util.Collections.unmodifiableMap; /** @@ -37,7 +38,7 @@ protected final Map loadMessages(String resource) { } catch (IOException e) { throw new RuntimeException(format("Source '{}' Messages Properties Resource[name : {}] loading is failed", source, resource), e); } - return messages == null ? null : unmodifiableMap(messages); + return messages == null ? emptyMap() : unmodifiableMap(messages); } private Properties loadAllProperties(String resource) throws IOException {