joerghoh commented on a change in pull request #5:
URL:
https://github.com/apache/sling-org-apache-sling-rewriter/pull/5#discussion_r795419293
##########
File path:
src/main/java/org/apache/sling/rewriter/impl/TransformerFactoryServiceTracker.java
##########
@@ -46,7 +50,7 @@ private boolean isGlobal(final ServiceReference ref) {
private TransformerFactoryEntry[][] cached = EMPTY_DOUBLE_ENTRY_ARRAY;
/** flag for cache. */
- private boolean cacheIsValid = true;
+ private volatile boolean cacheIsValid = true;
Review comment:
instead of wrapping all access into ```synchronized``` blocks, wouldn't
be the use of an ```AtomicBoolean``` a better way to deal with it?
--
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]