Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fabrizzio-dotCMS committed May 17, 2024
1 parent ef628e3 commit 7371d5a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,10 @@ protected synchronized void loadLocale(String localeKey) {
if (variables.isEmpty()) {
return;
}
Logger.debug(this, "Loading language variables for locale: " + localeKey);
synchronized (messages) {
for (LanguageVariable variable : variables) {
messages.put(messageKey(localeKey, variable.key()), variable.value());
putOrUpdate(messages, messageKey(localeKey, variable.key()), variable.value());
}
}
}
Expand Down Expand Up @@ -281,7 +282,7 @@ private void loadUserProvidedKeys(String localeKey) {
* @param buffy the buffered reader
* @throws IOException if an error occurs
*/
private void parseProps(Properties props, BufferedReader buffy) throws IOException {
private void parseProps(Map<Object,Object> props, BufferedReader buffy) throws IOException {
String line = null;
while ((line = buffy.readLine()) != null) {
if (UtilMethods.isSet(line) && line.contains("=") && !line.startsWith("#")) {
Expand Down Expand Up @@ -348,7 +349,7 @@ private static String parseVal(String val) {
* @param key the key
* @param val the value
*/
private void putOrUpdate(final Properties props, final String key, final String val) {
private void putOrUpdate(final Map<Object,Object> props, final String key, final String val) {
props.compute(key, (k, existingVal) -> {
if (existingVal != null) {
Logger.warn(this.getClass(), String.format(
Expand Down

0 comments on commit 7371d5a

Please sign in to comment.