This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new e7496e6  CAMEL-14349: camel-core - Transformer and Validator registry 
should be on-demand
e7496e6 is described below

commit e7496e603a1c7f62ded7613f652653c94aac712d
Author: Pascal Schumacher <[email protected]>
AuthorDate: Fri Jan 3 12:53:51 2020 +0100

    CAMEL-14349: camel-core - Transformer and Validator registry should be 
on-demand
    
    Mark transformerRegistry and validatorRegistry fields as volatile to make 
double-checked locking thread-safe.
---
 .../main/java/org/apache/camel/impl/engine/AbstractCamelContext.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
 
b/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index 0ac8bff..d2bb7d7 100644
--- 
a/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ 
b/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -260,8 +260,8 @@ public abstract class AbstractCamelContext extends 
ServiceSupport implements Ext
     private final DeferServiceFactory deferServiceFactory = new 
DefaultDeferServiceFactory();
     private final AnnotationBasedProcessorFactory 
annotationBasedProcessorFactory = new DefaultAnnotationBasedProcessorFactory();
 
-    private TransformerRegistry<TransformerKey> transformerRegistry;
-    private ValidatorRegistry<ValidatorKey> validatorRegistry;
+    private volatile TransformerRegistry<TransformerKey> transformerRegistry;
+    private volatile ValidatorRegistry<ValidatorKey> validatorRegistry;
     private EndpointRegistry<EndpointKey> endpoints;
     private RuntimeEndpointRegistry runtimeEndpointRegistry;
 

Reply via email to