You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2022/05/20 14:32:10 UTC

[GitHub] [sling-org-apache-sling-rewriter] schulm commented on a diff in pull request #7: SLING-11317 Reworked ProcessorManagerImpl, added Tests

schulm commented on code in PR #7:
URL: https://github.com/apache/sling-org-apache-sling-rewriter/pull/7#discussion_r878213150


##########
src/main/java/org/apache/sling/rewriter/impl/ProcessorManagerImpl.java:
##########
@@ -327,61 +326,14 @@ private synchronized void updateProcessor(final String path) {
                 }
                 if ( index != -1 ) {
                     // we are already in the array
-                    if ( index == 0 ) {
-                        // we are the first, so remove the old, and add the new
                         this.orderedProcessors.remove(configs[index].config);
                         configs[index] = new ConfigEntry(path, config);
                         if ( config.isActive() ) {
                             this.orderedProcessors.add(config);
                             Collections.sort(this.orderedProcessors, new ProcessorConfiguratorComparator());
-                        }
-                    } else {

Review Comment:
   Removed this clause we can't just replace the item, we have also update this.orderedProcessors...



-- 
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: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org