[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_r880865665 ## src/main/java/org/apache/sling/rewriter/impl/ProcessorManagerImpl.java: ## @@ -84,12 +81,6 @@ @Reference private ResourceResolverFactory resourceResolverFactory; -@Reference( Review Comment: Thanks, restored this. -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[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_r880817207 ## 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); Review Comment: I've simplified the ``updateProcessor``, its now just a ``removeProcessor`` and an `àddProcessor``. ## 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); Review Comment: I've simplified the ``updateProcessor``, its now just a ``removeProcessor`` and an ``addProcessor``. -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[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_r878229707 ## 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 { -// we are not the first, so we can simply exchange -configs[index] = new ConfigEntry(path, config); } } else { -// now we have to insert the new config at the correct place -int insertIndex = 0; -boolean found = false; -while ( !found && insertIndex < configs.length) { -final ConfigEntry current = configs[insertIndex]; -int currentIndex = -1; -for(int i=0; i
[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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org