jsedding commented on code in PR #26:
URL: 
https://github.com/apache/sling-org-apache-sling-i18n/pull/26#discussion_r4324781853


##########
src/main/java/org/apache/sling/i18n/impl/JcrResourceBundleProvider.java:
##########
@@ -277,55 +285,57 @@ private void onChange(final ChangeStatus status, final 
ResourceChange change) th
                 }
             }
 
-            // may be a completely new dictionary
             if (status.resourceResolver == null) {
                 status.resourceResolver = createResourceResolver();
             }
-            if (isDictionaryResource(status.resourceResolver, change)) {
+            final Resource resource = 
status.resourceResolver.getResource(change.getPath());
+            if (resource == null) {
+                log.trace("Could not get resource for '{}' for event {}", 
change.getPath(), change.getType());
+                return;
+            }

Review Comment:
   I expect that `resource == null` is always true for "delete" events. Is that 
correct?
   
   If that is the case, I think we need to invalidate the dictionary (or 
ResourceBundle if necessary) that contains this resource.



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