joerghoh commented on code in PR #193:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/193#discussion_r2290856706


##########
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java:
##########
@@ -450,28 +454,27 @@ public void onChange(final List<ResourceChange> changes) {
             final ResourceChange.ChangeType type = rc.getType();
             final String path = rc.getPath();
 
-            log.debug("onChange, type={}, path={}", rc.getType(), path);
+            log.debug("onChange, type={}, path={}", type, path);
 
             // don't care for system area
             if (path.startsWith(JCR_SYSTEM_PREFIX)) {
                 continue;
             }
 
-            // during startup: just enqueue the events
-            if (inStartup) {
-                if (type == ResourceChange.ChangeType.REMOVED
-                        || type == ResourceChange.ChangeType.ADDED
-                        || type == ResourceChange.ChangeType.CHANGED) {
+            boolean queued = false;
+
+            if (RELEVANT_CHANGE_TYPES.contains(type)) {
+                // during startup: just enqueue the events
+                if (inStartup) {

Review Comment:
   can you merge these 2 conditions (and probably change the order, as the 
boolean check is faster)?



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