ecolombo commented on code in PR #15:
URL: 
https://github.com/apache/sling-org-apache-sling-i18n/pull/15#discussion_r1716434059


##########
src/main/java/org/apache/sling/i18n/impl/JcrResourceBundleProvider.java:
##########
@@ -484,12 +466,13 @@ private ResourceBundle 
getResourceBundleInternal(ResourceResolver optionalResolv
                         }
 
                         resourceBundle = 
createResourceBundle(optionalResolver, key.baseName, key.locale);
-                        // put the newly created ResourceBundle to the cache. 
If it replaces an existing entry unregister the existing
-                        // service registration first before re-registering 
the new ResourceBundle.
-                        if (resourceBundleCache.put(key, resourceBundle) != 
null) {
-                            unregisterResourceBundle(key);
-                        }
-                        registerResourceBundle(key, resourceBundle);
+                        resourceBundleRegistry.updateRB(key, resourceBundle);
+
+                        final Set<String> languageRoots = 
resourceBundle.getLanguageRootPaths();
+                        this.languageRootPaths.addAll(languageRoots);
+
+                        log.debug("Key {} - added service registration and 
language roots {}", key, languageRoots);
+                        log.info("Currently loaded dictionaries across all 
locales: {}", languageRootPaths);

Review Comment:
   They are legacy, so I leave them as is. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to