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


##########
src/main/java/org/apache/sling/i18n/impl/JcrResourceBundleProvider.java:
##########
@@ -609,22 +560,13 @@ private ResourceBundle getRootResourceBundle() {
         return rootResourceBundle;
     }
 
-    private void clearCache() {
-        resourceBundleCache.clear();
+    void clearCache() {
         languageRootPaths.clear();
-
-        final List<ServiceRegistration<ResourceBundle>> regs;
-        synchronized (this) {
-            regs = new ArrayList<>(bundleServiceRegistrations.values());
-            bundleServiceRegistrations.clear();
-        }
-        for (final ServiceRegistration<ResourceBundle> serviceReg : regs) {
-            serviceReg.unregister();
-        }
+        resourceBundleRegistry.clear();

Review Comment:
   Sounds good, implemented.



-- 
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