Skip to content

Commit

Permalink
Update PropertiesResourceServiceMessageSource.java
Browse files Browse the repository at this point in the history
  • Loading branch information
mercyblitz committed Apr 22, 2024
1 parent 98374ff commit 6f3dc3d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -37,7 +38,7 @@ protected final Map<String, String> 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 {
Expand Down

0 comments on commit 6f3dc3d

Please sign in to comment.