You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/03/04 08:58:52 UTC

(camel) branch tc created (now e9c41f448c3)

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

davsclaus pushed a change to branch tc
in repository https://gitbox.apache.org/repos/asf/camel.git


      at e9c41f448c3 Fix setting type converter registry to keep backwards behaviour. CEQ depends on this to set its custom type converter registry at build time.

This branch includes the following new commits:

     new e9c41f448c3 Fix setting type converter registry to keep backwards behaviour. CEQ depends on this to set its custom type converter registry at build time.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(camel) 01/01: Fix setting type converter registry to keep backwards behaviour. CEQ depends on this to set its custom type converter registry at build time.

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e9c41f448c3c24911d1b42cb81133d9cd95b6d5d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Mar 4 09:52:26 2024 +0100

    Fix setting type converter registry to keep backwards behaviour. CEQ depends on this to set its custom type converter registry at build time.
---
 .../apache/camel/impl/engine/DefaultCamelContextExtension.java   | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultCamelContextExtension.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultCamelContextExtension.java
index 7708db01495..a19eb8f7548 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultCamelContextExtension.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultCamelContextExtension.java
@@ -791,11 +791,6 @@ class DefaultCamelContextExtension implements ExtendedCamelContext {
             synchronized (lock) {
                 if (typeConverterRegistry == null) {
                     setTypeConverterRegistry(camelContext.createTypeConverterRegistry());
-
-                    // some registries are also a type converter implementation
-                    if (typeConverterRegistry instanceof TypeConverter newTypeConverter) {
-                        setTypeConverter(newTypeConverter);
-                    }
                 }
             }
         }
@@ -804,6 +799,10 @@ class DefaultCamelContextExtension implements ExtendedCamelContext {
 
     void setTypeConverterRegistry(TypeConverterRegistry typeConverterRegistry) {
         this.typeConverterRegistry = camelContext.getInternalServiceManager().addService(camelContext, typeConverterRegistry);
+        // some registries are also a type converter implementation
+        if (typeConverterRegistry instanceof TypeConverter newTypeConverter) {
+            setTypeConverter(newTypeConverter);
+        }
     }
 
     void stopTypeConverter() {