sagarmiglani commented on a change in pull request #5:
URL: 
https://github.com/apache/sling-org-apache-sling-rewriter/pull/5#discussion_r795650901



##########
File path: 
src/main/java/org/apache/sling/rewriter/impl/TransformerFactoryServiceTracker.java
##########
@@ -58,8 +62,11 @@ public TransformerFactoryServiceTracker(final BundleContext 
bc, final String ser
     @Override
     public Object addingService(ServiceReference reference) {
         final boolean isGlobal = isGlobal(reference);
+        LOGGER.debug("Adding service {}, isGlobal={}", reference, isGlobal);
         if ( isGlobal ) {
-            this.cacheIsValid = false;
+            synchronized (this) {

Review comment:
       Thanks Carsten for pointing out the problem.. AFAIU, you meant that 
updates should be in sync with the super.addingService/removedService? I have 
made some changes. Please let me know if you were pointing something else or 
there is something else which needs to be improved.




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